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

:root {
  --bg: #0c0c0c;
  --surface: #141414;
  --surface2: #1c1c1c;
  --text: #f0ece4;
  --muted: #6b6760;
  --accent: #e8c49a;
  --accent2: #c8a97e;
  --green: #4ade80;
  --border: rgba(240,236,228,.07);
  --border-hover: rgba(240,236,228,.15);
  --font-display: 'DM Serif Display', serif;
  --font-ui: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
}

/* =====================
   CUSTOM CURSOR
   ===================== */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform .1s, width .3s, height .3s, background .3s;
}

.cursor-follower {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(232,196,154,.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform .18s ease, width .3s, height .3s, border-color .3s;
}

.cursor.hovered { width: 14px; height: 14px; background: #fff; }
.cursor-follower.hovered { width: 52px; height: 52px; border-color: rgba(232,196,154,.8); }

/* =====================
   NOISE
   ===================== */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  opacity: .025;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  background-size: 200px;
}

/* =====================
   NAVBAR
   ===================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 0 6%;
  transition: background .4s, border-color .4s;
}

.navbar.scrolled {
  background: rgba(12,12,12,.92);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  margin-right: auto;
}

.logo-bracket { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .25s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .3s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--muted);
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 99px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* =====================
   HERO
   ===================== */
.hero {
  height: 100vh;
  min-height: 700px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 0 6% 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-img-wrap {
  position: absolute;
  inset: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  filter: brightness(.32) saturate(.7);
  transform: scale(1.05);
  animation: hero-zoom 18s ease-in-out infinite alternate;
}

@keyframes hero-zoom {
  from { transform: scale(1.05); }
  to { transform: scale(1.12); }
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232,196,154,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,196,154,.03) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* Dark gradient from bottom */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(12,12,12,1) 0%,
    rgba(12,12,12,.7) 40%,
    rgba(12,12,12,.2) 70%,
    transparent 100%
  );
  z-index: 1;
}

/* Side gradient */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(12,12,12,.8) 0%,
    transparent 60%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: 700px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  opacity: 0;
  animation: fade-up .8s .3s forwards;
}

.eyebrow-line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.eyebrow-text {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow-year {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--muted);
  margin-left: auto;
}

.hero-title {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 10rem);
  line-height: .92;
  font-weight: 400;
  letter-spacing: -.02em;
  margin-bottom: 32px;
}

.title-line {
  display: block;
  opacity: 0;
  transform: translateY(60px);
  animation: title-reveal .9s cubic-bezier(.16,1,.3,1) forwards;
}

.title-line[data-index="0"] { animation-delay: .5s; }
.title-line[data-index="1"] { animation-delay: .7s; }
.title-line.italic { font-style: italic; color: var(--accent); }

@keyframes title-reveal {
  to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  opacity: 0;
  animation: fade-up .8s .9s forwards;
}

.hero-sub p {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  opacity: 0;
  animation: fade-up .8s 1.1s forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: var(--accent);
  color: #0c0c0c;
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
  border-radius: 4px;
  letter-spacing: .03em;
  transition: background .25s, transform .25s, gap .25s;
}

.btn-primary:hover {
  background: #f0d0aa;
  transform: translateY(-2px);
  gap: 14px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 14px 24px;
  border: 1px solid var(--border-hover);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  border-radius: 4px;
  letter-spacing: .03em;
  transition: border-color .25s, background .25s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(232,196,154,.06);
}

/* Hero Side Stats */
.hero-side {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding-bottom: 12px;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(20,20,20,.6);
  backdrop-filter: blur(20px);
  opacity: 0;
  animation: fade-up .8s 1.3s forwards;
}

.stat {
  padding: 22px 32px;
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 5px;
}

.stat-divider {
  height: 1px;
  background: var(--border);
  margin: 0 24px;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fade-in 1s 1.6s forwards;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: .3; }
  50% { opacity: 1; }
}

.hero-scroll span {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .2em;
  color: var(--muted);
  text-transform: uppercase;
}

/* =====================
   SECTIONS
   ===================== */
.section {
  padding: 140px 6%;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.section-num {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--accent);
  opacity: .6;
  letter-spacing: .12em;
}

.section-label {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .15em;
  text-transform: uppercase;
}

.section-label::before {
  content: '—— ';
  opacity: .4;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.01em;
  margin-bottom: 60px;
}

.section-title em {
  font-style: italic;
  color: var(--accent);
}

/* =====================
   ABOUT
   ===================== */
.about-section {
  border-top: 1px solid var(--border);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-body p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 40px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .88rem;
  color: var(--muted);
  font-weight: 500;
  transition: border-color .25s, color .25s, background .25s;
}

.skill-item:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(232,196,154,.04);
}

.skill-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232,196,154,.08);
  border-radius: 6px;
  color: var(--accent);
  font-size: .8rem;
  flex-shrink: 0;
}

/* Terminal */
.terminal {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0a0a;
  font-family: var(--font-mono);
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: #161616;
  border-bottom: 1px solid var(--border);
}

.t-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.t-dot.red    { background: #ff5f57; }
.t-dot.yellow { background: #ffbd2e; }
.t-dot.green  { background: #28c840; }

.t-title {
  font-size: .78rem;
  color: var(--muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 24px 20px;
  font-size: .82rem;
  line-height: 1.9;
}

.t-line { display: flex; gap: 10px; }
.t-prompt { color: var(--accent); }
.t-cmd { color: var(--text); }
.t-output { color: #7a9e7e; padding-left: 20px; }
.t-green { color: var(--green) !important; }

.t-blink {
  color: var(--accent);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* =====================
   EXPERIENCE
   ===================== */
.experience-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.timeline-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tl-item {
  display: grid;
  grid-template-columns: 180px 40px 1fr;
  gap: 0 32px;
  min-height: 180px;
}

.tl-left {
  padding-top: 4px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.tl-date {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .08em;
}

.tl-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: .7rem;
  font-family: var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tl-badge.current {
  background: rgba(74,222,128,.1);
  color: var(--green);
  border: 1px solid rgba(74,222,128,.2);
}

.tl-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.tl-dot.pulse::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: .4;
  animation: ripple 2s infinite;
}

@keyframes ripple {
  0% { transform: scale(1); opacity: .4; }
  100% { transform: scale(2); opacity: 0; }
}

.experience-section .tl-dot { background: var(--surface); }

.tl-line {
  width: 1px;
  flex: 1;
  background: var(--border);
  margin-top: 6px;
}

.tl-right {
  padding-bottom: 60px;
}

.tl-card {
  padding: 28px 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
  transition: border-color .3s;
}

.tl-card:hover { border-color: var(--border-hover); }

.tl-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.tl-card h4 {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent);
  letter-spacing: .06em;
  margin-bottom: 14px;
}

.tl-card p {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.tl-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tl-tags span {
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  font-size: .75rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* =====================
   PROJECTS
   ===================== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.proj-item {
  display: grid;
  grid-template-columns: 220px 1fr 60px;
  align-items: center;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .25s;
}

.proj-item:first-child { border-top: 1px solid var(--border); }

.proj-item:hover { background: rgba(232,196,154,.03); }
.proj-item:hover .proj-arrow { color: var(--accent); transform: translate(4px,-4px); }
.proj-item:hover .proj-arrow { opacity: 1; }

.proj-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.proj-num {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--accent);
  opacity: .5;
}

.proj-tags-inline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.proj-tags-inline span {
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  font-size: .72rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.proj-content h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  margin-bottom: 10px;
  transition: color .25s;
}

.proj-item:hover .proj-content h3 { color: var(--accent); }

.proj-content p {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.7;
}

.proj-arrow {
  font-size: 1.2rem;
  color: var(--muted);
  opacity: .4;
  transition: color .25s, transform .25s, opacity .25s;
  justify-self: end;
}

/* =====================
   CONTACT
   ===================== */
.contact-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0 6%;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 120px 0 80px;
  border-bottom: 1px solid var(--border);
}

.contact-text .section-num {
  display: block;
  margin-bottom: 24px;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.02em;
  margin-bottom: 20px;
}

.contact-text p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  justify-content: center;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background .25s;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: 4px;
}

.contact-link:first-child { border-top: 1px solid var(--border); }

.contact-link:hover { background: rgba(232,196,154,.04); }
.contact-link:hover .cl-arrow { color: var(--accent); transform: translateX(6px); }

.cl-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.cl-label {
  font-weight: 600;
  font-size: 1rem;
  flex: 1;
}

.cl-arrow {
  color: var(--muted);
  font-size: .85rem;
  transition: transform .25s, color .25s;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .06em;
}

/* =====================
   ANIMATIONS
   ===================== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1024px) {
  .about-layout { grid-template-columns: 1fr; gap: 60px; }
  .tl-item { grid-template-columns: 120px 32px 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 60px; padding: 80px 0 60px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-status { display: none; }
  .hero { padding: 0 6% 60px; flex-direction: column; justify-content: flex-end; gap: 40px; }
  .hero-side { width: 100%; }
  .hero-stats { flex-direction: row; width: 100%; }
  .stat-divider { width: 1px; height: auto; margin: 12px 0; }
  .stat { padding: 16px 20px; flex: 1; }
  .tl-item { grid-template-columns: 1fr; }
  .tl-left { text-align: left; flex-direction: row; align-items: center; }
  .tl-connector { display: none; }
  .proj-item { grid-template-columns: 1fr auto; }
  .proj-meta { display: none; }
  .section { padding: 80px 6%; }
  .skills-grid { grid-template-columns: 1fr; }
  .hero-scroll { display: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 4rem; }
  .hero-stats { flex-direction: column; }
  .stat-divider { width: auto; height: 1px; }
}
