/* ===== CSS RESET & VARIABLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #faf9f7;
  --bg-secondary: #f3f1ee;
  --bg-card: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #5a5a5a;
  --text-tertiary: #8a8a8a;
  --accent: #c4845a;
  --accent-light: rgba(196, 132, 90, 0.1);
  --border: rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 0;
  background: rgba(250, 249, 247, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: border-color 0.3s ease, background 0.3s ease;
}

nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(250, 249, 247, 0.95);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

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

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

.nav-resume {
  padding: 0.5rem 1.25rem;
  background: var(--text-primary);
  color: var(--bg-primary) !important;
  border-radius: 100px;
  font-size: 0.85rem;
  transition: opacity 0.2s ease;
}

.nav-resume:hover {
  opacity: 0.85;
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-left {
  max-width: 580px;
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

/* Hand-drawn highlighter effect for key words */
.hero-title .highlight {
  position: relative;
  display: inline;
  background: none;
}

.hero-title .highlight::before {
  content: "";
  position: absolute;
  left: -2%;
  top: 15%;
  width: 104%;
  height: 70%;
  background: linear-gradient(to bottom, rgba(255, 230, 150, 0.65), rgba(255, 220, 130, 0.55));
  border-radius: 3px;
  transform: rotate(-1deg);
  z-index: -1;
  filter: url(#marker-blur);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9rem 1.75rem;
  background: var(--text-primary);
  color: var(--bg-primary);
  border-radius: 100px;
  transition: opacity 0.2s ease;
}

.hero-cta:hover {
  opacity: 0.85;
}

.hero-cta svg {
  width: 16px;
  transition: transform 0.2s ease;
}

.hero-cta:hover svg {
  transform: translateX(4px);
}

.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Guitar */
.guitar-wrapper {
  position: relative;
}

.guitar-container {
  position: relative;
  width: 260px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-6deg);
}

.guitar-svg {
  width: 260px;
  height: 380px;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.18));
}

.guitar-body {
  fill: #2d1f18;
  stroke: rgba(255,255,255,0.15);
  stroke-width: 1;
}

.guitar-neck {
  fill: #1a120e;
}

.guitar-string {
  stroke: rgba(255,255,255,0.65);
  stroke-width: 1.5;
  cursor: pointer;
  transition: stroke 0.2s ease, filter 0.2s ease;
}

.guitar-string:hover {
  stroke: #fff;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.5));
}

.tap-to-play {
  position: absolute;
  bottom: -45px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ===== WORK SECTION ===== */
.work-section {
  padding: 6rem 2rem;
  background: var(--bg-secondary);
}

.section-container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Project Cards */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3rem;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s ease;
}

.project-card:hover {
  border-color: rgba(196, 132, 90, 0.3);
}

.project-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-number {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tag {
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 100px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1.25rem;
  transition: gap 0.2s ease;
}

.project-link:hover {
  gap: 0.75rem;
}

.project-link svg {
  width: 14px;
}

.project-preview {
  aspect-ratio: 16/10;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-preview svg {
  width: 64px;
  height: 64px;
  opacity: 0.4;
}

/* ===== ABOUT SECTION ===== */
.about-section {
  padding: 6rem 2rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.about-content {
  max-width: 480px;
}

.about-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.about-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

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

.about-text p {
  margin-bottom: 1.25rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.skills-section {
  padding-top: 2rem;
}

.skills-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 100px;
}

.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-illustration {
  width: 280px;
  height: 320px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.about-illustration svg {
  width: 120px;
  height: 120px;
  opacity: 0.5;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
  padding: 6rem 2rem;
  background: var(--bg-secondary);
  text-align: center;
}

.contact-container {
  max-width: 600px;
  margin: 0 auto;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.contact-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.contact-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.contact-email {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.85rem 2rem;
  border: 2px solid var(--accent);
  border-radius: 100px;
  transition: all 0.2s ease;
}

.contact-email:hover {
  background: var(--accent);
  color: white;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.contact-link {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

/* ===== FOOTER ===== */
footer {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ===== CASE STUDY PAGE ===== */
.case-study {
  max-width: 800px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}

.case-study-header {
  margin-bottom: 4rem;
  text-align: center;
}

.case-study-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}

.case-study-back:hover {
  color: var(--text-primary);
}

.case-study-back svg {
  width: 14px;
}

.case-study-title {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.case-study-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto;
}

.case-study-preview {
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-study-preview svg {
  width: 80px;
  height: 80px;
  opacity: 0.3;
}

.case-study-section {
  margin-bottom: 3rem;
}

.case-study-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.case-study-section p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.case-study-section ul {
  list-style: none;
  padding: 0;
}

.case-study-section li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.case-study-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ===== THINKING LAYER - ANNOTATIONS ===== */
.thinking-annotation {
  display: block;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
}

.thinking-annotation::before {
  content: "💡";
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  font-size: 0.75rem;
  opacity: 0.4;
}

/* ===== INTERACTIVE REFLECTION TOGGLE ===== */
.reflection-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.reflection-toggle:hover {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-color: rgba(0,0,0,0.1);
}

.reflection-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.reflection-toggle.active svg {
  transform: rotate(180deg);
}

/* ===== INTERACTIVE REFLECTION PANEL ===== */
.reflection-panel {
  display: none;
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.reflection-panel.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

.reflection-panel p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.reflection-panel p:not(:last-child) {
  margin-bottom: 0.75rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 8rem 2rem 4rem;
    gap: 2rem;
    text-align: center;
  }

  .hero-left {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  /* Text first, guitar below on tablet/mobile */
  .hero-right {
    order: 1;
    padding: 2rem 0;
  }

  .guitar-container {
    width: 200px;
    height: 300px;
  }

  .guitar-svg {
    width: 200px;
    height: 300px;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-preview {
    order: -1;
    aspect-ratio: 16/7;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-visual {
    order: -1;
  }
}

@media (max-width: 600px) {
  .nav-links {
    gap: 1.5rem;
  }

  .hero {
    padding: 7rem 1.5rem 3rem;
  }

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

  .hero-subtitle {
    font-size: 1rem;
  }

  .guitar-container {
    width: 180px;
    height: 260px;
  }

  .guitar-svg {
    width: 180px;
    height: 260px;
  }

  .project-card {
    padding: 1.75rem;
  }

  .project-title {
    font-size: 1.25rem;
  }

  .case-study {
    padding: 7rem 1.5rem 3rem;
  }

  .case-study-title {
    font-size: 1.75rem;
  }
}