/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f7fb;
  --text: #1a1d29;
  --text-muted: #565a6e;
  --border: #e5e7ef;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;
  --card-bg: #ffffff;
  --shadow: 0 2px 10px rgba(20, 20, 40, 0.06);
  --shadow-lg: 0 12px 30px rgba(20, 20, 40, 0.10);
  --radius: 14px;
  --max-width: 1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --bg-alt: #151824;
    --text: #eef0f6;
    --text-muted: #a4a8bd;
    --border: #262b3d;
    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --accent-soft: #1c1f36;
    --card-bg: #161a26;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

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

.nav-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 72px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 56px;
}

.hero-text { flex: 1.2; min-width: 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 0 20px;
}

h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 12px;
}

.accent { color: var(--accent); }

.hero-tagline {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.hero-intro {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.social-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.social-links svg { width: 20px; height: 20px; }

.social-links-lg a {
  width: 48px;
  height: 48px;
}
.social-links-lg svg { width: 22px; height: 22px; }

.hero-photo {
  flex: 0 0 auto;
  width: min(320px, 38vw);
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

/* ---------- Sections ---------- */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  margin: 0 0 40px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.about-subtitle {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 20px;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill-group-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 8px;
}

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

.tag {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.fun-facts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.fun-facts-list li {
  position: relative;
  padding-left: 24px;
  color: var(--text-muted);
}

.fun-facts-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Timeline (Education / Experience) ---------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-item {
  position: relative;
  padding-left: 24px;
  border-left: 2px solid var(--border);
  padding-bottom: 4px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-period {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 4px;
}

.timeline-title {
  font-weight: 700;
  margin: 0 0 2px;
  font-size: 1rem;
}

.timeline-org {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 6px;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-alt);
}

.project-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-alt));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.4rem;
}

.project-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.project-title {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.project-links {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.project-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.15s ease;
}

.project-links a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- Achievements ---------- */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.achievement-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.achievement-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 4px;
}

.achievement-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- Contact ---------- */
.contact-section { text-align: center; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact-lead {
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 0 28px;
}

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

.footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner {
    flex-direction: column-reverse;
    align-items: stretch;
    text-align: center;
    gap: 32px;
  }
  .hero-text { width: 100%; }
  .hero-intro { margin-left: auto; margin-right: auto; }
  .hero-actions, .social-links { justify-content: center; }
  .hero-photo { width: min(220px, 55vw); align-self: center; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 24px 20px;
    display: none;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .section { padding: 56px 0; }
  .hero { padding: 64px 0 48px; }
}
