:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #edf2f7;
  --text: #18212b;
  --muted: #687482;
  --line: #dbe2ea;
  --primary: #315b8a;
  --primary-2: #203f62;
  --accent: #9fb6ce;
  --shadow: 0 20px 50px rgba(31, 49, 70, .10);
}

* { 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: var(--bg);
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
.container { width: min(1120px, calc(100% - 40px)); margin: auto; }

.header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247,249,252,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(219,226,234,.8);
}
.nav { height: 72px; display: flex; align-items: center; gap: 28px; }
.logo { font-size: 24px; font-weight: 900; letter-spacing: -1px; margin-right: auto; }
.logo span { color: var(--primary); }
nav { display: flex; gap: 26px; }
nav a { font-size: 14px; font-weight: 700; color: var(--muted); }
nav a:hover { color: var(--primary); }
.theme-btn, .menu-btn {
  border: 1px solid var(--line); background: var(--surface);
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
}
.menu-btn { display: none; }

.hero { padding: 100px 0 90px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 70px; }
.eyebrow {
  color: var(--primary); font-size: 12px; font-weight: 900;
  letter-spacing: 2px; margin-bottom: 14px;
}
h1 { font-size: clamp(42px, 6vw, 76px); line-height: 1.02; letter-spacing: -3px; }
h1 span { color: var(--primary); }
.hero-desc { max-width: 700px; color: var(--muted); font-size: 18px; margin: 25px 0; }
.hero-actions { display: flex; gap: 12px; margin: 26px 0; }
.btn {
  padding: 12px 20px; border-radius: 12px; font-weight: 800;
  border: 1px solid var(--line); transition: .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { color: white; background: var(--primary); border-color: var(--primary); }
.btn.secondary { background: var(--surface); }
.quick-info { display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

.hero-photo { position: relative; justify-self: center; width: 330px; height: 390px; }
.hero-photo img {
  position: absolute; inset: 15px 15px 45px;
  width: calc(100% - 30px); height: calc(100% - 60px);
  object-fit: cover; border-radius: 42% 42% 28% 28%;
  box-shadow: var(--shadow); z-index: 2;
}
.photo-ring {
  position: absolute; inset: 0 0 25px;
  border: 2px solid var(--accent); border-radius: 45% 45% 30% 30%;
  transform: rotate(5deg);
}
.floating-card {
  position: absolute; z-index: 4; right: -30px; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow);
}
.floating-card small { display: block; color: var(--muted); }
.dot { width: 10px; height: 10px; background: #36a269; border-radius: 50%; }

.section { padding: 100px 0; }
.section-alt { background: var(--surface-2); }
.section-heading { margin-bottom: 42px; }
.section-heading h2, .contact-box h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -1.5px; }

.about-grid, .skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.about-card, .skill-card {
  padding: 28px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: 0 8px 30px rgba(31,49,70,.04);
}
.about-card h3, .skill-card h3 { margin-bottom: 10px; }
.about-card p, .skill-card p { color: var(--muted); }

.skills-grid { grid-template-columns: repeat(4, 1fr); }
.skill-icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 15px; background: var(--surface-2); color: var(--primary);
  font-weight: 900; margin-bottom: 20px;
}
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tags span, .project-tags span {
  padding: 6px 11px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 700;
}

.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project-card {
  padding: 28px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 20px; transition: .25s;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.project-card.featured { border-color: var(--accent); }
.project-top { display: flex; justify-content: space-between; margin-bottom: 26px; }
.project-number { color: var(--primary); font-weight: 900; font-size: 14px; }
.project-type { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.project-card h3 { font-size: 22px; margin-bottom: 12px; }
.project-card p { color: var(--muted); }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.project-tags span { background: var(--surface-2); }

.contact-section { padding-top: 40px; }
.contact-box {
  display: flex; justify-content: space-between; align-items: center; gap: 30px;
  padding: 45px; background: var(--primary-2); color: white; border-radius: 28px;
}
.contact-box .eyebrow { color: #bcd2e8; }
.contact-box p:not(.eyebrow) { color: #d4deea; margin-top: 10px; }
.contact-links { display: flex; flex-direction: column; gap: 10px; min-width: 220px; }
.contact-links a {
  padding: 11px 15px; border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px; text-align: center; font-weight: 800;
}
.contact-links a:hover { background: rgba(255,255,255,.1); }

footer { padding: 26px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 15px; }

.reveal { opacity: 0; transform: translateY(18px); transition: .7s ease; }
.reveal.show { opacity: 1; transform: none; }

body.dark {
  --bg: #0e141b; --surface: #151e28; --surface-2: #1b2733;
  --text: #edf3f8; --muted: #aab6c2; --line: #293746;
  --primary: #7fa9d2; --primary-2: #182d43; --accent: #486987;
}
body.dark .header { background: rgba(14,20,27,.86); }

@media (max-width: 850px) {
  .hero { padding-top: 70px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-photo { order: -1; width: 260px; height: 310px; }
  .hero-actions, .quick-info { justify-content: center; }
  .about-grid, .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-box { flex-direction: column; align-items: flex-start; }
  nav { display: none; position: absolute; top: 72px; left: 0; right: 0; padding: 18px 20px;
        background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; }
  nav.open { display: flex; }
  .menu-btn { display: block; }
}
@media (max-width: 560px) {
  .container { width: min(100% - 28px, 1120px); }
  h1 { letter-spacing: -2px; }
  .about-grid, .skills-grid, .projects-grid { grid-template-columns: 1fr; }
  .section { padding: 75px 0; }
  .contact-box { padding: 28px; }
  .footer-inner { flex-direction: column; }
}
