:root {
  --blue: #1E5AA8;
  --blue-dark: #12355F;
  --blue-light: #DCEBFF;
  --white: #FFFFFF;
  --beige: #F3E8D5;
  --gold: #CDB892;
  --text: #12355F;
  --muted: #60708A;
  --bg: #FAFBFF;
  --card: #FFFFFF;
  --border: rgba(18, 53, 95, 0.10);
  --shadow: 0 20px 60px rgba(18, 53, 95, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 48%, #fbf4e9 100%);
  overflow: hidden;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.app-shell {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.navbar {
  min-height: 92px;
  padding: 18px clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.brand img { width: 170px; height: auto; }
.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
}
.nav-link, .footer button {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 10px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  transition: 0.2s ease;
}
.nav-link:hover, .nav-link.active, .footer button:hover {
  color: var(--blue);
  background: var(--blue-light);
}
.menu-toggle { display: none; border: none; background: var(--blue-light); border-radius: 16px; width: 48px; height: 48px; padding: 13px; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; background: var(--blue-dark); margin: 5px 0; border-radius: 6px; }

.btn {
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: var(--white); box-shadow: 0 14px 30px rgba(30, 90, 168, 0.24); }
.btn-secondary { color: var(--blue-dark); background: var(--white); border: 1px solid rgba(205, 184, 146, 0.65); }

.portfolio-stage {
  position: relative;
  height: calc(100dvh - 92px);
  overflow: hidden;
}
.section {
  display: none;
  height: 100%;
  animation: softIn 0.32s ease both;
}
.section.active { display: block; }
.section-scroll {
  height: 100%;
  overflow-y: auto;
  padding: clamp(30px, 4vw, 70px) clamp(20px, 5vw, 90px);
  scrollbar-width: thin;
  scrollbar-color: var(--blue-light) transparent;
}
.section-scroll::-webkit-scrollbar { width: 8px; }
.section-scroll::-webkit-scrollbar-thumb { background: var(--blue-light); border-radius: 999px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  grid-template-rows: auto auto;
  gap: 28px 54px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  color: var(--blue);
  background: var(--blue-light);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 20px;
}
h1, h2, h3 { color: var(--blue-dark); line-height: 1.08; }
h1 { font-size: clamp(42px, 6vw, 82px); letter-spacing: -0.055em; margin-bottom: 12px; }
.hero-content h2 { font-size: clamp(22px, 2.4vw, 34px); color: var(--blue); margin-bottom: 22px; }
.hero-text, .section-heading p, .info-card p, .timeline p, .skill-box p, .project-card p, .contact-info p, .about-card p, .floating-card span, .quick-stats span, .footer p, .footer small {
  color: var(--muted);
  line-height: 1.7;
}
.hero-text { font-size: 18px; max-width: 680px; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.social-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.social-row a {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.7);
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--blue-dark);
  font-weight: 800;
}
.hero-visual { position: relative; min-height: 600px; display: grid; place-items: center; }
.visual-shape { position: absolute; border-radius: 999px; filter: blur(0.2px); }
.shape-one { width: 420px; height: 420px; background: var(--blue-light); right: 30px; top: 40px; }
.shape-two { width: 300px; height: 300px; background: var(--beige); left: 30px; bottom: 55px; }
.hero-avatar {
  position: relative;
  z-index: 2;
  max-height: 570px;
  object-fit: contain;
  border: 4px white solid;
  border-radius: 20%;
  filter: drop-shadow(0 34px 55px rgba(18, 53, 95, 0.18));
}
.floating-card {
  position: absolute;
  z-index: 3;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
  border-radius: 22px;
  padding: 16px 18px;
  display: grid;
  gap: 3px;
}
.top-card { top: 92px; left: 34px; }
.bottom-card { right: 24px; bottom: 88px; }
.floating-card strong { color: var(--blue-dark); }
.quick-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.quick-stats article, .info-card, .skill-box, .project-card, .about-card, .contact-form, .timeline-item {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.quick-stats article { padding: 24px; }
.quick-stats strong { display: block; font-size: 24px; color: var(--blue); }

.section-heading { max-width: 760px; margin-bottom: 34px; }
.section-heading.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-heading h2 { font-size: clamp(30px, 4vw, 54px); letter-spacing: -0.04em; margin-bottom: 16px; }
.section-heading p { font-size: 17px; }
.two-column {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 30px;
  align-items: start;
}
.full-width { grid-column: 1 / -1; }
.about-card { padding: 28px; display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: center; }
.about-card img { width: 120px; height: 120px; object-fit: cover; border-radius: 34px; border: 7px solid var(--beige); }
.about-card h3 { font-size: 24px; margin-bottom: 10px; }
.cards-grid, .education-grid, .projects-grid, .skill-layout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.info-card { padding: 26px; min-height: 210px; }
.info-card span { display: inline-flex; color: var(--blue); background: var(--blue-light); border-radius: 999px; padding: 8px 12px; font-weight: 900; margin-bottom: 24px; }
.info-card h3 { font-size: 21px; margin-bottom: 12px; }

.skill-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.skill-box { padding: 30px; }
.skill-box h3 { font-size: 26px; margin-bottom: 20px; }
.badges, .tech { display: flex; flex-wrap: wrap; gap: 10px; }
.badges span, .tech b {
  color: var(--blue-dark);
  background: var(--blue-light);
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.projects-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-card { overflow: hidden; }
.project-card img { width: 100%; height: 190px; object-fit: cover; }
.project-card div { padding: 22px; }
.project-card span { display: block; color: var(--blue); font-weight: 900; margin-bottom: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.project-card h3 { font-size: 22px; margin-bottom: 10px; }
.project-card p { min-height: 78px; }
.tech { margin: 15px 0; }
.mini-btn {
  border: 1px solid rgba(30, 90, 168, .25);
  color: var(--blue);
  background: var(--white);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
  cursor: pointer;
}

.timeline { max-width: 1000px; margin: 0 auto; display: grid; gap: 18px; }
.timeline-item { display: grid; grid-template-columns: 230px 1fr; gap: 28px; padding: 26px; position: relative; }
.timeline-item::before { content: ""; position: absolute; left: 245px; top: 30px; width: 14px; height: 14px; background: var(--blue); border-radius: 50%; }
.timeline time { color: var(--blue); font-weight: 900; }
.timeline h3 { margin-bottom: 7px; font-size: 23px; }
.timeline strong { display: block; color: var(--blue); margin-bottom: 10px; }
.education-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 36px;
}
.contact-info h2 { font-size: clamp(32px, 4vw, 58px); letter-spacing: -0.05em; margin-bottom: 18px; }
.contact-list { display: grid; gap: 12px; margin-top: 30px; }
.contact-list a { display: grid; gap: 4px; background: rgba(255,255,255,.75); border: 1px solid var(--border); border-radius: 20px; padding: 18px; transition: .2s ease; }
.contact-list a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.contact-list strong { color: var(--blue); }
.contact-list span { color: var(--muted); }
.contact-form { padding: 30px; display: grid; gap: 16px; }
.contact-form label { display: grid; gap: 8px; font-weight: 900; color: var(--blue-dark); }
.contact-form input, .contact-form textarea {
  border: 1px solid var(--border);
  background: #F7F9FC;
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  color: var(--text);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30,90,168,.12); }

.contact-form .hidden-field { display: none; }
.form-status { min-height: 22px; margin: -4px 0 0; font-size: 14px; font-weight: 800; }
.form-status.info { color: var(--muted); }
.form-status.success { color: #157347; }
.form-status.error { color: #B42318; }
.contact-form button:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.footer { margin-top: 20px; padding: 24px; background: rgba(255,255,255,.72); border: 1px solid var(--border); border-radius: var(--radius-lg); display: grid; gap: 12px; }
.footer img { width: 150px; }
.footer div { display: flex; flex-wrap: wrap; gap: 8px; }

.reveal { animation: rise .52s ease both; }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }
@keyframes softIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1180px) {
  .nav-menu { position: fixed; inset: 92px 18px auto 18px; background: rgba(255,255,255,.96); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 24px; padding: 16px; display: none; flex-direction: column; align-items: stretch; }
  .nav-menu.open { display: flex; }
  .menu-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-link { text-align: left; }
  .hero-grid, .two-column, .contact-layout { grid-template-columns: 1fr; }
  .hero-visual { min-height: 520px; order: -1; }
  .cards-grid, .projects-grid, .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { overflow: hidden; }
  .navbar { min-height: 78px; padding: 14px 18px; }
  .brand img { width: 146px; }
  .portfolio-stage { height: calc(100dvh - 78px); }
  .nav-menu { inset: 78px 12px auto 12px; }
  .section-scroll { padding: 26px 18px 38px; }
  .hero-grid { gap: 22px; }
  h1 { font-size: 40px; text-align: center; }
  .hero-content h2, .hero-text { text-align: center; }
  .eyebrow { margin-left: auto; margin-right: auto; display: table; }
  .actions, .social-row { justify-content: center; }
  .hero-visual { min-height: 410px; }
  .shape-one { width: 270px; height: 270px; right: 20px; top: 20px; }
  .shape-two { width: 220px; height: 220px; left: 8px; bottom: 20px; }
  .hero-avatar { max-height: 390px; }
  .floating-card { display: none; }
  .quick-stats, .cards-grid, .projects-grid, .skill-layout, .education-grid, .service-grid { grid-template-columns: 1fr; }
  .about-card { grid-template-columns: 1fr; text-align: center; }
  .about-card img { margin: 0 auto; }
  .timeline-item { grid-template-columns: 1fr; gap: 10px; }
  .timeline-item::before { display: none; }
  .contact-layout { grid-template-columns: 1fr; }
  .project-card p { min-height: auto; }
}
