/* ══════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════ */
:root {
  --cream:      #F5F0E8;
  --warm-white: #FDFAF5;
  --ink:        #1A1714;
  --ink-soft:   #3D3830;
  --accent:     #C8500A;
  --accent-lt:  #E8652A;
  --accent-dim: rgba(200, 80, 10, 0.12);
  --dark-bg:    #111009;
  --dark-card:  #1C1A15;
  --dark-border:#2E2B24;
  --border:     rgba(26,23,20,0.10);
  --shadow-sm:  0 2px 12px rgba(26,23,20,0.08);
  --shadow-md:  0 8px 32px rgba(26,23,20,0.12);
  --shadow-lg:  0 24px 64px rgba(26,23,20,0.16);
  --radius:     16px;
  --radius-sm:  10px;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;
  --nav-h:      72px;
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-sans);
  background: var(--warm-white);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.65;
}

img { max-width: 100%; }

a { text-decoration: none; }

/* ══════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

/* ══════════════════════════════════════
   TYPOGRAPHY HELPERS
══════════════════════════════════════ */
.section-label {
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
  display: block;
}
.section-label.light { color: var(--accent-lt); }

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.section-title.light { color: var(--warm-white); }
.section-title em { font-style: italic; color: var(--accent); }

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn-primary-custom {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: .75rem 1.75rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: .95rem;
  transition: background .25s var(--ease-out), transform .2s, box-shadow .25s;
  box-shadow: 0 4px 20px rgba(200,80,10,.35);
}
.btn-primary-custom:hover {
  background: var(--accent-lt);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200,80,10,.45);
}

.btn-secondary-custom {
  background: var(--accent-dim);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: .75rem 1.75rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: .95rem;
  transition: background .25s var(--ease-out), transform .2s, box-shadow .25s;
  box-shadow: 0 4px 20px rgba(200,80,10,.35);
}
.btn-secondary-custom:hover {
  background: var(--accent-dim);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200,80,10,.45);
}

.btn-outline-custom {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: .75rem 1.75rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: .95rem;
  transition: border-color .25s, color .25s, transform .2s;
}
.btn-outline-custom:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
#mainNav {
  height: var(--nav-h);
  padding: 0 1rem;
  background: transparent;
  backdrop-filter: blur(0px);
  transition: background .4s, backdrop-filter .4s, box-shadow .4s;
  z-index: 1050;
}
#mainNav.scrolled {
  background: rgba(253, 250, 245, 0.88);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}

.navbar-brand { display: flex; align-items: center; }
.brand-initials {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  transition: border-color .2s, color .2s;
}
#mainNav:not(.scrolled) .brand-initials { border-color: rgba(255,255,255,.6); color: #fff; }
#mainNav:not(.scrolled) .brand-initials:hover { border-color: #fff; }

.nav-link {
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink) !important;
  padding: .35rem .75rem !important;
  border-radius: 99px;
  transition: color .2s, background .2s;
  position: relative;
}

.nav-link:hover { color: var(--accent) !important; background: var(--accent-dim); }

/* Custom toggler */
.navbar-toggler { border: none; padding: 0; }
.navbar-toggler:focus { box-shadow: none; }
.toggler-icon {
  display: flex; flex-direction: column; gap: 5px; cursor: pointer;
  width: 26px;
}
.toggler-icon span {
  display: block; height: 2px; background: var(--ink);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
#mainNav:not(.scrolled) .toggler-icon span { background: #fff; }

/* Mobile nav */
@media (max-width: 991px) {
  #navMenu {
    background: rgba(253,250,245,.97);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    margin-top: .5rem;
    padding: 1rem;
    box-shadow: var(--shadow-md);
  }
  .nav-link { color: var(--ink) !important; }
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero-section {
  position: relative;
  min-height: 100vh;
  background: var(--ink);
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 40%, transparent 100%);
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  pointer-events: none;
}
.hero-blob-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #C8500A 0%, transparent 70%);
  top: -100px; left: -150px;
  animation: blobFloat 8s ease-in-out infinite alternate;
}
.hero-blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #8B3A00 0%, transparent 70%);
  bottom: -50px; right: -80px;
  animation: blobFloat 10s ease-in-out infinite alternate-reverse;
}
@keyframes blobFloat {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.08); }
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: .85rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-lt);
  margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 10vw, 7rem);
  line-height: 1.0;
  color: var(--warm-white);
  margin-bottom: 1.5rem;
}
.hero-title em { color: var(--accent); }

.hero-sub {
  font-size: 1.1rem;
  color: rgba(245,240,232,.65);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* Badge cluster */
.hero-badge-wrap {
  display: flex; flex-direction: column; gap: 1rem;
}
.hero-badge {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 1rem;
}
.badge-number {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--accent-lt);
  line-height: 1;
}
.badge-label {
  font-size: .82rem;
  color: rgba(245,240,232,.6);
  line-height: 1.4;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: rgba(245,240,232,.4);
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(200,80,10,.8), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: .4; transform: scaleY(1); }
  50%      { opacity: 1;  transform: scaleY(1.2); }
}

/* ══════════════════════════════════════
   SECTION PAD
══════════════════════════════════════ */
.section-pad { padding: 7rem 0; }
.section-dark { background: var(--dark-bg); }

/* ══════════════════════════════════════
   ABOUT
══════════════════════════════════════ */
.about-img-wrap {
  position: relative;
  display: inline-block;
  padding: 1.5rem;
}
.about-img-frame {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream);
  border: 2px solid var(--border);
  aspect-ratio: 4/5;
  display: grid; place-items: center;
}
.about-img-placeholder {
  font-size: 6rem;
  color: var(--accent);
  opacity: .5;
}
.about-deco-dot {
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: var(--accent);
  border-radius: 50%;
  opacity: .15;
  animation: breathe 4s ease-in-out infinite;
}
.about-deco-ring {
  position: absolute;
  bottom: .5rem; left: .5rem;
  width: 100px; height: 100px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: .2;
  animation: breathe 5s ease-in-out infinite reverse;
}
@keyframes breathe {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}

.about-body {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.skills-grid {
  display: flex; flex-wrap: wrap; gap: .6rem;
}
.skill-tag {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: .35rem .95rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: border-color .2s, color .2s;
}
.skill-tag:hover { border-color: var(--accent); color: var(--accent); }

/* ══════════════════════════════════════
   WORKS GRID
══════════════════════════════════════ */
.work-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .35s var(--ease-out), box-shadow .35s, border-color .3s;
  height: 100%;
}
.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
  border-color: var(--accent);
}

.work-card-thumb {
  aspect-ratio: 16/9;
  background: hsl(var(--hue), 55%, 14%);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
  transition: background .3s;
}
.work-card-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, hsl(var(--hue), 80%, 35%) 0%, transparent 65%);
  opacity: .5;
}
.work-thumb-inner {
  position: relative; z-index: 1;
  font-size: 2.5rem;
  color: hsl(var(--hue), 70%, 75%);
  transition: transform .35s var(--ease-out);
}
.work-card:hover .work-thumb-inner { transform: scale(1.1) rotate(-5deg); }

.work-card-body { padding: 1.5rem; }
.work-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-lt);
  margin-bottom: .6rem;
}
.work-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--warm-white);
  margin-bottom: .5rem;
}
.work-desc {
  font-size: .88rem;
  color: rgba(245,240,232,.5);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}
.work-btn {
  background: none; border: none; padding: 0;
  color: var(--accent-lt);
  font-size: .88rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex; align-items: center; gap: .35rem;
  transition: gap .2s, color .2s;
}
.work-card:hover .work-btn { gap: .6rem; color: var(--accent-lt); }

/* ══════════════════════════════════════
   MODAL
══════════════════════════════════════ */
.work-modal-content {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  color: var(--warm-white);
}
.modal-close-btn {
  position: absolute;
  top: 1rem; right: 1rem;
  z-index: 10;
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.modal-close-btn:hover { background: var(--accent); transform: rotate(90deg); }

.modal-hero {
  aspect-ratio: 16/7;
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.modal-hero-icon { font-size: 4rem; position: relative; z-index: 1; }

.modal-project-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin: .5rem 0 1rem;
  color: var(--warm-white);
}
.modal-project-desc {
  color: rgba(245,240,232,.65);
  line-height: 1.7;
}

.modal-meta .meta-item {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  padding: 1rem;
}
.modal-meta .meta-label {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(245,240,232,.4);
  margin-bottom: .3rem;
}
.modal-meta .meta-value {
  font-size: .95rem;
  font-weight: 500;
  color: var(--warm-white);
}

.modal-tech h5 {
  font-size: .78rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(245,240,232,.4);
  margin-bottom: .75rem;
}
.modal-tech-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.modal-tech-tag {
  background: rgba(200,80,10,.15);
  border: 1px solid rgba(200,80,10,.3);
  color: var(--accent-lt);
  border-radius: 99px;
  padding: .25rem .8rem;
  font-size: .8rem;
}

.modal-backdrop.show { backdrop-filter: blur(6px); }

/* ══════════════════════════════════════
   TIMELINE
══════════════════════════════════════ */
.timeline-wrap {
  position: relative;
  padding-left: 2rem;
  max-width: 750px;
  margin: 0 auto;
}
.timeline-wrap::before {
  content: '';
  position: absolute;
  left: 0; top: 12px; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
  padding-left: 2rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2.42rem;
  top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--warm-white);
  box-shadow: 0 0 0 3px var(--accent-dim);
  transition: transform .3s, box-shadow .3s;
}
.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
  box-shadow: 0 0 0 6px var(--accent-dim);
}

.timeline-content {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow .3s, transform .3s;
}
.timeline-item:hover .timeline-content {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.timeline-year {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: .5rem;
}
.timeline-role {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: .3rem;
}
.timeline-company {
  font-size: .88rem;
  color: var(--ink-soft);
  opacity: .7;
  margin-bottom: .75rem;
}
.timeline-desc {
  font-size: .92rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.timeline-tags {
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.timeline-tags span {
  background: rgba(200,80,10,.1);
  border: 1px solid rgba(200,80,10,.2);
  color: var(--accent);
  border-radius: 99px;
  padding: .2rem .7rem;
  font-size: .76rem;
  font-weight: 500;
}

/* ══════════════════════════════════════
   CONTACT
══════════════════════════════════════ */
.contact-sub {
  font-size: 1.05rem;
  color: rgba(245,240,232,.55);
  line-height: 1.7;
}

.social-links { }
.social-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.15);
  display: grid; place-items: center;
  color: rgba(245,240,232,.6);
  font-size: 1.1rem;
  transition: border-color .25s, color .25s, background .25s, transform .2s;
}
.social-icon:hover {
  border-color: var(--accent);
  color: var(--accent-lt);
  background: rgba(200,80,10,.1);
  transform: translateY(-3px);
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer {
  background: var(--dark-bg);
  border-top: 1px solid var(--dark-border);
  padding: 1.5rem 0;
}
.footer-name {
  font-family: var(--font-serif);
  color: var(--warm-white);
  font-size: 1rem;
}
.footer-copy {
  font-size: .82rem;
  color: rgba(245,240,232,.35);
}

/* ══════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
══════════════════════════════════════ */
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal-up    { transform: translateY(36px); }
.reveal-left  { transform: translateX(-36px); }
.reveal-right { transform: translateX(36px); }

.revealed.reveal-up    { opacity: 1; transform: translateY(0); }
.revealed.reveal-left  { opacity: 1; transform: translateX(0); }
.revealed.reveal-right { opacity: 1; transform: translateX(0); }

.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .2s; }
.delay-3 { transition-delay: .3s; }

/* Hero elements — no delay on first load (JS triggers) */
.hero-section .reveal-up {
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.hero-section .delay-1 { transition-delay: .15s; }
.hero-section .delay-2 { transition-delay: .30s; }
.hero-section .delay-3 { transition-delay: .45s; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 767px) {
  .section-pad { padding: 5rem 0; }
  .hero-title { font-size: clamp(2.8rem, 14vw, 5rem); }
  .timeline-wrap { padding-left: 1.25rem; }
  .timeline-item { padding-left: 1.25rem; }
  .timeline-dot { left: -1.67rem; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .btn-primary-custom, .btn-outline-custom { width: 100%; text-align: center; justify-content: center; }
}
