:root {
  --bg: #f7f8fb;
  --bg-alt: #eef1f7;
  --surface: #ffffff;
  --text: #14181f;
  --text-muted: #5b6472;
  --border: #e2e6ee;
  --primary: #1e3a8a;
  --primary-light: #2f52b8;
  --accent: #3b82f6;
  --shadow: 0 10px 30px rgba(20, 24, 31, 0.06);
  --radius: 16px;
  --font-heading: 'Poppins', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
  --bg: #0c0f16;
  --bg-alt: #10141d;
  --surface: #151a24;
  --text: #eef1f7;
  --text-muted: #9aa4b6;
  --border: #232a38;
  --primary: #6b8afd;
  --primary-light: #8ba3ff;
  --accent: #60a5fa;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

svg { width: 20px; height: 20px; flex-shrink: 0; }

ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.logo span { color: var(--primary); }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 2px;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover { color: var(--text); }

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.nav-link:hover::after { width: 100%; }

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 999px;
}

.nav-cta::after { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 76px;
  background:
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    radial-gradient(circle at 10% 90%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 55%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

.eyebrow {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.role {
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-weight: 600;
  color: var(--primary-light);
  margin-top: 10px;
}

.tagline {
  color: var(--text-muted);
  margin-top: 8px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.hero-desc {
  margin-top: 22px;
  color: var(--text-muted);
  max-width: 540px;
  font-size: 1.02rem;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1px solid transparent;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 35%, transparent);
}

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.hero-socials {
  display: flex;
  gap: 14px;
  margin-top: 30px;
}

.hero-socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-socials a:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.hero-photo {
  display: flex;
  justify-content: center;
}

.photo-ring {
  width: min(320px, 80%);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow);
}

.photo-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg);
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* Sections */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); }

.section-eyebrow {
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.section-note {
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 40px;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  margin-top: 30px;
  align-items: start;
}

.about-text {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.about-info {
  display: grid;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.info-value { font-weight: 600; }

.soft-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}

.pill {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.skill-card h3 {
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 13px;
  border-radius: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Timeline */
.timeline {
  position: relative;
  margin-top: 40px;
  padding-left: 32px;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -39px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
}

.timeline-content h3 {
  font-size: 1.12rem;
  margin-bottom: 14px;
}

.timeline-content h3 span {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.timeline-content ul { display: grid; gap: 8px; }

.timeline-content li {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding-left: 18px;
  position: relative;
}

.timeline-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Projects */
.projects-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 10px;
}

.projects-grid .project-card {
  flex: 1 1 320px;
  max-width: 380px;
}

.project-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover { transform: translateY(-6px); }

.project-thumb {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  transition: transform 0.4s ease;
}

.project-card:hover .project-thumb img { transform: scale(1.05); }

.project-thumb-brand {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

.project-thumb svg { width: 40px; height: 40px; }

.project-thumb-doc .doc-mock { width: 130px; height: auto; }

.project-body { padding: 22px; }

.project-body h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--primary-light);
}

.project-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.project-card.placeholder {
  border-style: dashed;
  opacity: 0.75;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.contact-card svg { color: var(--primary); width: 24px; height: 24px; }

.contact-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.contact-value { font-weight: 600; word-break: break-word; }

.contact-static { cursor: default; }
.contact-static:hover { transform: none; border-color: var(--border); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.back-top { font-weight: 600; color: var(--primary); }

/* Reveal animation */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-socials { justify-content: center; }
  .hero-buttons { justify-content: center; }
  .hero-photo { order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    transform: translateY(-130%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav.open { transform: translateY(0); opacity: 1; }

  .nav-cta { align-self: flex-start; }

  .menu-toggle { display: flex; }

  .menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 480px) {
  .section { padding: 80px 0; }
  .container { padding: 0 18px; }
}
