/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --bg: #ffffff;
  --surface: #f5f5f5;
  --border: #e0e0e0;
  --text: #111111;
  --muted: #666666;
  --accent: #111111;
  --font: "Inter", system-ui, sans-serif;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

/* ── Typography ── */
h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
h2 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}
h3 {
  font-size: 1.05rem;
  font-weight: 600;
}
p {
  color: var(--muted);
}
a {
  color: var(--text);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ── Layout ── */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}
section:first-of-type {
  border-top: none;
}

/* ── Navbar ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  position: relative;
}
.nav-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-links {
  display: flex;
  gap: 1.8rem;
}
.nav-links a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.2s,
    opacity 0.2s;
}
.nav-links.open {
  display: flex;
}

/* ── Hero ── */
#hero {
  padding: 9rem 0 5rem;
  border-top: none;
}
.hero-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.hero-title {
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 2rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.3rem;
  border: 1.5px solid var(--text);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  transition:
    background 0.2s,
    color 0.2s;
}
.btn:hover {
  background: var(--text);
  color: #fff;
  text-decoration: none;
}
.btn-ghost {
  border-color: var(--border);
  color: var(--muted);
}
.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
}

/* ── About ── */
.about-text {
  font-size: 1.05rem;
  color: var(--muted);
}
.about-text + .about-text {
  margin-top: 1rem;
}

/* ── Skills ── */
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.skill-row {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
}
.skill-cat {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  min-width: 140px;
  flex-shrink: 0;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag {
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  color: var(--text);
}
.tag.prof-hi {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tag.prof-lo {
  color: var(--muted);
}

/* ── Projects ── */
.project-card {
  padding: 1.6rem 1.5rem;
  border-top: 1px solid var(--border);
}
.project-card:first-of-type {
  margin-top: 1.5rem;
}
.project-card p {
  font-size: 0.93rem;
  margin-top: 0.4rem;
}
.tech-stack {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1rem;
}

/* ── Experience ── */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.exp-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.exp-date {
  font-size: 0.82rem;
  color: var(--muted);
}
.exp-role {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.15rem;
  font-style: italic;
}
.project-date {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.3rem;
  font-style: italic;
}
.project-duration {
  font-size: 0.82rem;
  color: var(--muted);
  display: block;
  margin-top: 0.3rem;
}
.project-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.project-header h3 {
  flex: 1;
  min-width: 200px;
}
.project-visit {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  border: 1.5px solid var(--text);
  border-radius: 6px;
  padding: 0.35rem 0.8rem;
  margin-top: 0.4rem;
  transition:
    background 0.2s,
    color 0.2s;
}
.project-visit:hover {
  background: var(--text);
  color: #fff;
  text-decoration: none;
}
.project-link {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
  transition: background 0.2s;
}
.project-link:hover {
  background: var(--surface);
  text-decoration: none;
}
.exp-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ── Contact ── */
.contact-text {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 1.8rem;
}
.contact-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Fade-in animation ── */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Hero Buttons ── */
.hero-btns .btn {
  min-width: 180px;
  width: 180px;
  justify-content: center;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  h1 {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
  h2 {
    font-size: 1.35rem;
  }
  section {
    padding: 3.5rem 0;
  }
  #hero {
    padding: 7rem 0 3.5rem;
  }
  .hero-sub {
    font-size: 1rem;
  }
  .hero-btns {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
  }
  .hero-btns .btn {
    min-width: unset;
    width: 180px;
  }
  .hero-btns .btn-ghost {
    margin-left: 0;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .exp-item {
    gap: 0.4rem;
  }
  .exp-date {
    font-size: 0.78rem;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 0.8rem;
  }
  .nav-links a {
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
  }
  .nav-links a:first-child {
    border-top: none;
    padding-top: 0;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links.open {
    display: flex;
  }
  .skill-row {
    flex-direction: column;
    gap: 0.4rem;
  }
  .skill-cat {
    min-width: unset;
  }
  .project-card {
    padding: 1.2rem 0;
  }
  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .project-header h3 {
    min-width: unset;
  }
  .contact-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .contact-links .btn {
    width: auto;
    min-width: unset;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .nav-logo {
    font-size: 0.85rem;
  }
}
