*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F8F7F4;
  --surface: #FFFFFF;
  --border: #E5E3DC;
  --text: #1A1916;
  --muted: #7A7870;
  --accent: #2A5C45;
  --accent-light: #EDF4F0;
  --accent-mid: #4A9B72;
  --tag-bg: #EEECEA;
  --tag-text: #4A4840;
  --nav-bg: rgba(248, 247, 244, 0.85);
  --accent-border: #C5DDD3;
  --avatar-from: #C5DDD3;
  --avatar-to: #8BC4A9;
  --code-blue: #5B8DB8;
  --code-orange: #C47A3A;
  --accent-dark: #1F4533;
  --btn-primary-bg: #1A1916;
}

[data-theme="dark"] {
  --bg: #141416;
  --surface: #1E1E22;
  --border: #2E2E34;
  --text: #E8E6E0;
  --muted: #9A9890;
  --accent: #5DBB8A;
  --accent-light: #1A2E24;
  --accent-mid: #4A9B72;
  --tag-bg: #28282C;
  --tag-text: #B0AEA8;
  --nav-bg: rgba(20, 20, 22, 0.85);
  --accent-border: #2A5C45;
  --avatar-from: #1A2E24;
  --avatar-to: #2A5C45;
  --code-blue: #7BAFD4;
  --code-orange: #D4944E;
  --accent-dark: #4A9B72;
  --btn-primary-bg: #3A3A40;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 60px;
  display: flex; align-items: center; gap: 4px;
}
.nav-logo {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 32px; margin-left: auto; margin-right: auto; }
.nav-links a {
  font-size: 14px; color: var(--muted); text-decoration: none;
  font-weight: 400; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* HAMBURGER */
.nav-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 4px; color: var(--text); flex-shrink: 0;
}
.nav-hamburger .close-icon { display: none; }
nav.open .nav-hamburger .hamburger-icon { display: none; }
nav.open .nav-hamburger .close-icon { display: block; }

/* THEME TOGGLE */
.theme-toggle {
  background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: color 0.2s;
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* LANG TOGGLE */
.lang-toggle {
  background: none; border: none; cursor: pointer;
  padding: 6px 8px; color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 8px; transition: color 0.2s;
}
.lang-toggle:hover { color: var(--text); }

/* LAYOUT */
.container { max-width: 960px; margin: 0 auto; padding: 0 40px; }

section { padding: 100px 0; }
section + section { border-top: 1px solid var(--border); }

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* HERO */
#hero {
  padding: 120px 0 100px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  align-items: start;
}
.hero-availability {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-light); border: 1px solid var(--accent-border);
  border-radius: 100px; padding: 6px 14px;
  font-size: 13px; color: var(--accent); margin-bottom: 32px;
}
.hero-availability-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-mid);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.hero-name {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(52px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
}
.hero-name em {
  font-style: italic;
  color: var(--accent);
}
.hero-desc {
  font-size: 18px;
  color: var(--muted);
  font-weight: 300;
  max-width: 460px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.hl { color: var(--accent); font-weight: 500; }
.hero-ai-note {
  margin-bottom: 24px;
  border-left: 2px solid var(--accent-border);
  padding-left: 14px;
}
.hero-cta {
  font-size: 17px;
  color: var(--accent);
  font-weight: 500;
  max-width: 460px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.btn-copy-email {
  display: inline-block; text-decoration: none;
  background: var(--btn-primary-bg); color: white;
  padding: 14px 32px; border-radius: 8px;
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
}
.btn-copy-email:hover { background: var(--accent); transform: translateY(-1px); }

.hero-card-links {
  display: flex; gap: 8px; margin-top: 16px;
}
.hero-card-link {
  flex: 1; text-align: center;
  color: var(--muted); text-decoration: none;
  font-size: 13px; font-weight: 500;
  padding: 8px 0;
  border: 1px solid var(--border); border-radius: 8px;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.hero-card-link:hover { border-color: var(--accent-mid); color: var(--accent); background: var(--accent-light); }

.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface); color: var(--accent);
  border: 1px solid var(--accent-border);
  padding: 10px 24px; border-radius: 100px;
  font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 200;
}
.toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.hero-actions { display: flex; gap: 16px; align-items: center; }
.btn-primary {
  background: var(--btn-primary-bg); color: white;
  padding: 12px 28px; border-radius: 6px;
  font-size: 15px; font-weight: 500;
  text-decoration: none; transition: background-color 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }
.btn-ghost {
  color: var(--muted); font-size: 15px; text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--text); }
.btn-ghost-arrow { font-size: 18px; }

.profile-strip { display: flex; flex-direction: column; }
.profile-header { display: flex; flex-direction: column; }
.profile-photo {
  width: 100%; aspect-ratio: 1 / 1;
  object-fit: cover; border-radius: 12px;
  display: block; margin-bottom: 18px;
}
.profile-info { margin-bottom: 4px; }
.profile-name { font-weight: 500; font-size: 15px; color: var(--text); }
.profile-role { font-size: 13px; color: var(--muted); margin-top: 3px; }
.profile-divider {
  border: none; border-top: 1px solid var(--border);
  margin: 16px 0;
}
.profile-links { display: flex; gap: 10px; align-items: center; }
.profile-link {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--muted); text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
  flex-shrink: 0;
}
.profile-link:hover { border-color: var(--accent-mid); color: var(--accent); background: var(--accent-light); }
.profile-link-email {
  width: auto; gap: 7px; padding: 0 12px;
  font-size: 13px; font-weight: 500;
}
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--tag-bg); color: var(--tag-text);
  font-size: 12px; font-family: 'DM Mono', monospace;
  padding: 4px 10px; border-radius: 4px;
}

/* PROJECTS */
#projects .section-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 48px;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 40px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.see-all { font-size: 14px; color: var(--muted); text-decoration: none; }
.see-all:hover { color: var(--accent); }

.projects-placeholder {
  font-size: 16px; color: var(--muted);
  font-style: italic; padding: 40px 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  text-decoration: none; color: inherit;
  transition: border-color 0.2s, transform 0.2s;
  display: flex; flex-direction: column;
}
.project-card:hover { border-color: var(--accent-mid); transform: translateY(-2px); }
.project-card.featured {
  grid-column: span 2;
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: 40px; align-items: center;
}
.project-meta {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 16px;
}
.project-type {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em;
}
.project-link-icon {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.project-card:hover .project-link-icon {
  border-color: var(--accent-mid); color: var(--accent);
}
.project-title {
  font-family: 'DM Serif Display', serif;
  font-size: 22px; letter-spacing: -0.01em;
  line-height: 1.2; margin-bottom: 10px;
}
.project-desc {
  font-size: 14px; color: var(--muted); line-height: 1.6;
  flex: 1; margin-bottom: 20px;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  background: var(--tag-bg); color: var(--tag-text);
  font-size: 11px; font-family: 'DM Mono', monospace;
  padding: 3px 9px; border-radius: 4px;
}

.project-visual {
  background: var(--bg);
  border-radius: 10px;
  height: 200px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 13px; color: var(--muted);
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.project-visual-code {
  font-size: 12px; color: var(--muted); text-align: left; padding: 20px;
  line-height: 1.8;
}
.code-green { color: var(--accent-mid); }
.code-blue { color: var(--code-blue); }
.code-orange { color: var(--code-orange); }

/* EXPERIENCE */
#experience .section-header { margin-bottom: 48px; }

.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: grid; grid-template-columns: 160px 1fr;
  gap: 32px; padding: 32px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-year {
  font-family: 'DM Mono', monospace;
  font-size: 12px; color: var(--muted);
  padding-top: 4px;
}
.timeline-company {
  font-size: 13px; color: var(--accent);
  font-family: 'DM Mono', monospace;
  margin-bottom: 6px;
}
.timeline-role {
  font-family: 'DM Serif Display', serif;
  font-size: 22px; letter-spacing: -0.01em;
  line-height: 1.2; margin-bottom: 12px;
}
.timeline-desc {
  font-size: 14px; color: var(--muted); line-height: 1.65;
  margin-bottom: 16px;
}
.timeline-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.subsection-header { margin-top: 48px; margin-bottom: 32px; }
.subsection-title {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ABOUT */
#about .section-header { margin-bottom: 32px; }
.about-content { max-width: 640px; }
.about-text {
  font-size: 16px; color: var(--muted);
  line-height: 1.7; margin-bottom: 16px;
}
.about-text:last-child { margin-bottom: 0; }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-copy { font-size: 13px; color: var(--muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* RESPONSIVE */
@media (max-width: 768px) {
  html { overflow-x: hidden; }
  body { width: 100%; overflow-x: hidden; }
  nav { padding: 0 20px; flex-wrap: wrap; height: auto; min-height: 60px; }
  .nav-logo { height: 60px; display: flex; align-items: center; }
  .nav-links { gap: 2px; }
  .lang-toggle { margin-left: auto; }
  .nav-hamburger { display: flex; align-items: center; height: 60px; }
  .nav-links {
    display: none; flex-direction: column;
    width: 100%; order: 3;
    padding: 12px 0 16px;
    border-top: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 10px 0; font-size: 16px;
  }
  .container { padding: 0 20px; }
  .project-visual-code { font-size: 11px; word-break: break-all; }

  section { padding: 60px 0; }

  #hero {
    padding: 100px 0 60px;
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-name { font-size: clamp(36px, 8vw, 52px); }
  .hero-desc { font-size: 16px; }
  .hero-desc, .hero-cta { margin-left: auto; margin-right: auto; }
  .profile-header {
    flex-direction: row; align-items: center; gap: 14px; justify-content: center;
  }
  .profile-photo {
    width: 56px; aspect-ratio: 1 / 1;
    border-radius: 8px; flex-shrink: 0; margin-bottom: 0;
  }
  .profile-divider { display: none; }
  .profile-links { margin-top: 16px; justify-content: center; }

  .section-title { font-size: 28px; }
  .subsection-title { font-size: 22px; }

  .projects-grid { grid-template-columns: 1fr; }
  .project-card.featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
