/* ══════════════════════════════════════════════════════════════
   COLOR VARIABLES & THEMES
   ══════════════════════════════════════════════════════════════ */
:root {
  --ink: #f5f2ed;
  --paper: #0c0c0c;
  --paper2: #1a1a1a;
  --red: #ff6b5a;
  --muted: #999;
  --faint: #333;
  --playfair: 'Playfair Display', serif;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'IBM Plex Sans', sans-serif;
  --transition: 0.3s ease;
}

/* ══════════════════════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--paper);
}

::-webkit-scrollbar-thumb {
  background: var(--faint);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ══════════════════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4rem;
  height: 64px;
  background: var(--paper);
  border-bottom: 1px solid var(--faint);
  transition: all var(--transition);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 300;
}

.nav-logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
  transition: transform 0.3s;
}

.nav-logo:hover .nav-logo-dot {
  transform: scale(1.5);
}

.nav-center {
  display: flex;
  gap: 2.5rem;
}

.nav-center a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.nav-center a:hover {
  color: var(--ink);
}

.nav-right {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ── Hamburger Button ── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: none;
  border: 1px solid var(--faint);
  border-radius: 3px;
  gap: 5px;
  position: relative;
  z-index: 300;
  transition: border-color var(--transition), background var(--transition);
}

.hamburger-btn:hover {
  border-color: var(--red);
  background: rgba(192, 57, 43, 0.04);
}

.hamburger-btn .bar {
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s, width 0.3s;
  transform-origin: center;
}

.hamburger-btn .bar-mid {
  width: 14px;
}

.hamburger-btn.open .bar-top {
  transform: translateY(6.5px) rotate(45deg);
  width: 20px;
}

.hamburger-btn.open .bar-mid {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.open .bar-bot {
  transform: translateY(-6.5px) rotate(-45deg);
  width: 20px;
}

.hamburger-btn.open {
  border-color: var(--red);
  background: rgba(192, 57, 43, 0.06);
}

/* ══════════════════════════════════════════════════════════════
   MENU OVERLAY
   ══════════════════════════════════════════════════════════════ */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
  display: grid;
  grid-template-columns: 1fr 340px;
}

.menu-red-line {
  position: absolute;
  left: 0;
  top: 64px;
  width: 0;
  height: 3px;
  background: var(--red);
  transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1) 0.1s;
}

.menu-overlay.open .menu-red-line {
  width: calc(100% - 340px);
}

.menu-panel-left {
  background: var(--ink);
  padding: 100px 5rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(-100%);
  transition: transform 0.65s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
}

.menu-panel-right {
  background: var(--paper2);
  border-left: 1px solid var(--faint);
  padding: 100px 3rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform 0.65s cubic-bezier(0.23, 1, 0.32, 1) 0.05s;
  pointer-events: none;
}

.menu-overlay.open {
  pointer-events: all;
}

.menu-overlay.open .menu-panel-left {
  transform: translateX(0);
  pointer-events: all;
}

.menu-overlay.open .menu-panel-right {
  transform: translateX(0);
  pointer-events: all;
}

.menu-nav-links {
  list-style: none;
}

.menu-nav-links li {
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.menu-nav-links li:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.menu-nav-links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.4rem 0;
  text-decoration: none;
  font-family: var(--playfair);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--paper);
  letter-spacing: -0.02em;
  transition: color 0.3s, padding-left 0.3s;
  transform: translateY(100%);
  opacity: 0;
}

.menu-nav-links a .link-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.menu-nav-links a:hover {
  color: var(--paper);
  background-color: #3333333f;
  padding-left: 0.5rem;
}

.menu-nav-links a:hover .link-num {
  opacity: 1;
}

.menu-overlay.open .menu-nav-links a {
  animation: slideUp 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.menu-overlay.open .menu-nav-links li:nth-child(1) a {
  animation-delay: 0.18s;
}

.menu-overlay.open .menu-nav-links li:nth-child(2) a {
  animation-delay: 0.26s;
}

.menu-overlay.open .menu-nav-links li:nth-child(3) a {
  animation-delay: 0.34s;
}

@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.menu-bottom {
  display: flex;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  transition: opacity 0.4s 0.5s;
}

.menu-overlay.open .menu-bottom {
  opacity: 1;
}

.menu-social-link {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(245, 242, 237, 0.35);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.menu-social-link:hover {
  color: var(--paper);
}

.menu-right-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.menu-status-card {
  background: var(--paper);
  border: 1px solid var(--faint);
  border-radius: 3px;
  padding: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s 0.5s, transform 0.4s 0.5s;
}

.menu-overlay.open .menu-status-card {
  opacity: 1;
  transform: translateY(0);
}

.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.avail-dot {
  width: 6px;
  height: 6px;
  background: #27ae60;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.menu-footer-info {
  margin-top: 2rem;
}

.menu-footer-info a {
  color: var(--red);
  text-decoration: none;
  transition: color var(--transition);
}

.menu-footer-info a:hover {
  color: var(--ink);
}

/* ══════════════════════════════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════════════════════════════ */
.hero {
  padding: 120px 4rem 60px;
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.hero-main {
  max-width: 900px;
}

.hero-title {
  font-family: var(--playfair);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
}

.hero-title em {
  font-style: italic;
  color: var(--red);
}

.hero-subtext {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.6;
}

.hero-marquee {
  background: var(--paper2);
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  padding: 1.5rem 0;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 3rem;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-track .hi {
  color: var(--red);
  margin: 0 1rem;
}

/* ══════════════════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════════════════ */
section {
  padding: 80px 4rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
}

.section-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.section-num {
  font-family: var(--playfair);
  font-size: 4rem;
  font-weight: 900;
  color: var(--faint);
  line-height: 1;
  margin-bottom: 1rem;
}

.section-title-side {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-body {
  max-width: 800px;
}

/* ── About Section ── */
.about-headline {
  font-family: var(--playfair);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

.about-headline em {
  font-style: italic;
  color: var(--red);
}

.about-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
}

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.skill-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  padding: 0.5rem 1rem;
  background: var(--paper2);
  color: var(--ink);
  border: 1px solid var(--faint);
  border-radius: 20px;
  letter-spacing: 0.05em;
  transition: all var(--transition);
}

.skill-chip:hover {
  background: var(--red);
  color: var(--paper);
  border-color: var(--red);
}

/* ── Education Section ── */
.edu-timeline {
  display: flex;
  flex-direction: column;
}

.edu-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--faint);
  transition: padding-left var(--transition);
}

.edu-item:first-child {
  padding-top: 0;
}

.edu-item:hover {
  padding-left: 0.75rem;
}

.edu-year {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.edu-degree {
  font-family: var(--playfair);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}


/* ══════════════════════════════════════════════════════════════
   PROJECTS SECTION
   ══════════════════════════════════════════════════════════════ */
.projects-header {
  display: contents;
}

.projects-header-left {
  grid-column: 1;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.projects-header-right {
  grid-column: 2;
  font-family: var(--mono);
  font-size: 2rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 3rem;
}

.proj-featured-row {
  display: contents;
}

.proj-featured-visual {
  grid-column: 2;
  position: relative;
  margin-bottom: 2rem;
}

.proj-featured-label {
  position: absolute;
  top: -30px;
  left: 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--red);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

/* .proj-featured-visual svg {
  width: 100%;
  max-width: 300px;
  height: auto;
} */

.proj-featured-text {
  grid-column: 2;
  background: var(--paper2);
  padding: 3rem;
  border-radius: 3px;
  margin-bottom: 4rem;
}

.proj-title {
  font-family: var(--playfair);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.proj-sub {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.proj-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  padding: 0.4rem 0.8rem;
  background: rgba(192, 57, 43, 0.1);
  color: var(--red);
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.proj-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: all var(--transition);
}

.proj-link:hover {
  gap: 0.5rem;
  color: var(--ink);
}

.project-row {
  grid-column: 2;
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--faint);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}

.project-row:hover {
  background: var(--paper2);
  padding: 2rem 2rem;
  margin: 0 -2rem;
}

.proj-index {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.proj-arrow {
  color: var(--muted);
  font-size: 18px;
  transition: transform var(--transition);
}

.project-row:hover .proj-arrow {
  transform: translateX(4px);
  color: var(--red);
}

/* ══════════════════════════════════════════════════════════════
   CONTACT SECTION
   ══════════════════════════════════════════════════════════════ */
#contact {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
}

.contact-left {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-headline {
  font-family: var(--playfair);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.contact-headline em {
  font-style: italic;
  color: var(--red);
}

.contact-sub {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 2rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  transition: all var(--transition);
  width: fit-content;
  padding: 0.8rem 1rem;
  background: var(--red);
  color: var(--paper);
  border-radius: 3px;
}

.contact-email:hover {
  transform: translateX(4px);
}

.contact-bottom-note {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.contact-right {
  grid-column: 2;
}

.contact-links-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.contact-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--faint);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}

.contact-link-item:hover {
  color: var(--red);
}

.link-name {
  font-family: var(--playfair);
  font-size: 1.1rem;
  font-weight: 600;
}

.link-handle {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 0.3rem;
}

.link-icon {
  font-size: 16px;
  opacity: 0.5;
  transition: all var(--transition);
}

.contact-link-item:hover .link-icon {
  opacity: 1;
  transform: translateX(2px) translateY(-2px);
  color: var(--red);
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
footer {
  padding: 4rem;
  border-top: 1px solid var(--faint);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.red {
  color: var(--red);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  section {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 60px 2rem;
  }

  .section-sidebar {
    position: relative;
    top: 0;
    margin-bottom: 1rem;
  }

  #contact {
    grid-template-columns: 1fr;
  }

  .contact-right {
    grid-column: 1;
  }

  nav {
    padding: 0 2rem;
  }

  .nav-center {
    display: none;
  }

  .hamburger-btn {
    display: flex;
  }

  .projects-header-right {
    grid-column: 1;
  }

  .proj-featured-visual {
    grid-column: 1;
  }

  .proj-featured-text {
    grid-column: 1;
  }

  .project-row {
    grid-column: 1;
  }

  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 100px 2rem 40px;
    gap: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .menu-overlay {
    grid-template-columns: 1fr 280px;
  }

  .menu-overlay.open .menu-red-line {
    width: calc(100% - 280px);
  }

  .menu-panel-left {
    padding: 80px 2rem 3rem;
  }

  .menu-panel-right {
    padding: 80px 2rem 3rem;
  }

  .section-num {
    font-size: 2.5rem;
  }

  .skill-chip {
    font-size: 10px;
    padding: 0.4rem 0.8rem;
  }

  .proj-featured-text {
    padding: 2rem;
  }

  .proj-title {
    font-size: 1.8rem;
  }

  .contact-headline {
    font-size: 2rem;
  }

  .about-headline {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 80px 1.5rem 30px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  nav {
    padding: 0 1.5rem;
  }

  nav .nav-right {
    display: none;
  }

  section {
    padding: 40px 1.5rem;
    gap: 1.5rem;
  }

  .section-num {
    font-size: 1.8rem;
  }

  .proj-featured-text {
    padding: 1.5rem;
  }

  .proj-title {
    font-size: 1.4rem;
  }

  footer {
    padding: 2rem 1.5rem;
    font-size: 10px;
  }
}