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

:root {
  --bg:        #0c0c0f;
  --surface:   #111116;
  --surface2:  #17171e;
  --border:    #1f1f2a;
  --red:       #c0392b;
  --red-dim:   #8f0d0d;
  --gold:      #d4a843;
  --text:      #c8c8d8;
  --text-dim:  #585870;
  --text-mute: #3a3a4a;
  --white:     #eeeef4;
  --mono:      'JetBrains Mono', monospace;
  --sans:      'Syne', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ─── TEXTURES ─────────────────────────────────────── */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.grid-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}

/* ─── TYPOGRAPHY HELPERS ───────────────────────────── */
.mono { font-family: var(--mono); }
strong { color: var(--white); font-weight: 500; }
em { color: var(--gold); font-style: normal; }
a { color: inherit; text-decoration: none; }

/* ─── NAV ──────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  background: rgba(12,12,15,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
#navbar.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.5); }

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

.nav-logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.05em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 100%;
  height: 1px;
  background: var(--red);
  transition: right 0.25s ease;
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { right: 0; }

.blink {
  animation: blink 1.1s step-end infinite;
  color: var(--red);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem 2rem 1.5rem;
  gap: 1rem;
  border-top: 1px solid var(--border);
}
.mobile-menu a {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.mobile-menu.open { display: flex; }

@media (max-width: 680px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* ─── SECTIONS ─────────────────────────────────────── */
section {
  position: relative;
  z-index: 1;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 7rem 2rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 3rem;
}
.section-label .prompt { color: var(--text-dim); }

.section-sublabel {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

/* ─── HERO ─────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding-top: 80px;
}

.hero-pre {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}
.hero-pre .prompt { color: var(--gold); }

.hero-name {
  font-family: var(--sans);
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  font-weight: 800;
  line-height: 0.95;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

/* Red underline accent on second word */
.hero-name::after {
  display: none;
}

.hero-tagline {
  font-family: var(--mono);
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: var(--red);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.hero-location {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 3rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text);
  letter-spacing: 0.06em;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.hero-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.hero-link:hover {
  border-color: var(--red);
  color: var(--white);
  background: rgba(192,57,43,0.08);
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--text-mute);
  letter-spacing: 0.15em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.scroll-arrow {
  animation: bounce 1.6s ease-in-out infinite;
  display: block;
}
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ─── ABOUT ────────────────────────────────────────── */
#about { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text);
  margin-bottom: 1.2rem;
  font-size: 0.92rem;
  line-height: 1.9;
}
.about-text p:last-child { margin-bottom: 0; }

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-left: 2rem;
  border-left: 1px solid var(--border);
}
.stat {}
.stat-num {
  display: block;
  font-family: var(--sans);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { flex-direction: row; flex-wrap: wrap; padding-left: 0; border-left: none; border-top: 1px solid var(--border); padding-top: 2rem; }
}

/* ─── EXPERIENCE ───────────────────────────────────── */
#experience {}

.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 3.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.timeline-item.visible { opacity: 1; transform: translateY(0); }
.timeline-item:last-child { padding-bottom: 0; }

.tl-dot {
  position: absolute;
  left: -2.4rem;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-dim);
  border: 1px solid var(--red);
  transition: background 0.3s;
}
.timeline-item:hover .tl-dot { background: var(--red); box-shadow: 0 0 8px var(--red); }

.tl-content {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.6rem;
  transition: border-color 0.2s;
}
.timeline-item:hover .tl-content { border-color: var(--red-dim); }

.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.tl-role {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 0.15rem;
}

.tl-company {
  font-size: 0.8rem;
  color: var(--red);
  letter-spacing: 0.06em;
}

.tl-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tl-date, .tl-location {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.tl-desc {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.tl-list {
  list-style: none;
  margin-bottom: 1rem;
}
.tl-list li {
  font-size: 0.83rem;
  color: var(--text);
  padding-left: 1.2em;
  position: relative;
  margin-bottom: 0.4rem;
  line-height: 1.7;
}
.tl-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--red);
}

.tl-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-size: 0.68rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* ─── SKILLS ───────────────────────────────────────── */
#skills { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (max-width: 820px) { .skills-grid { grid-template-columns: 1fr; gap: 2rem; } }

.skill-level {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.skill-bar-group { display: flex; flex-direction: column; gap: 0.9rem; }

.skill-bar-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.skill-bar-item span {
  width: 90px;
  font-size: 0.8rem;
  color: var(--text);
  flex-shrink: 0;
}

.bar {
  flex: 1;
  height: 3px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red-dim), var(--red));
  transition: width 1s cubic-bezier(0.16,1,0.3,1);
}

.domains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 720px) { .domains { grid-template-columns: 1fr; } }

.domain-card {
  padding: 1.6rem;
  border: 1px solid var(--border);
  background: var(--surface2);
  transition: border-color 0.25s, transform 0.25s;
}
.domain-card:hover {
  border-color: var(--red-dim);
  transform: translateY(-3px);
}
.domain-icon { font-size: 1.5rem; margin-bottom: 0.8rem; }
.domain-card h4 {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.domain-card p { font-size: 0.78rem; color: var(--text-dim); line-height: 1.7; }

/* ─── EDUCATION ────────────────────────────────────── */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 4rem;
}
@media (max-width: 680px) { .edu-grid { grid-template-columns: 1fr; } }

.edu-card {
  display: flex;
  gap: 1.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.8rem;
  transition: border-color 0.2s;
}
.edu-card:hover { border-color: var(--red-dim); }

.edu-badge {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--red);
  background: rgba(143,13,13,0.12);
  border: 1px solid var(--red-dim);
  padding: 0.4rem 0.6rem;
  height: fit-content;
  flex-shrink: 0;
  min-width: 46px;
  text-align: center;
}
.edu-badge--alt { color: var(--gold); background: rgba(212,168,67,0.10); border-color: rgba(212,168,67,0.3); }

.edu-body h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 0.25rem;
}
.edu-school { font-size: 0.78rem; color: var(--red); letter-spacing: 0.04em; margin-bottom: 0.2rem; }
.edu-date { font-size: 0.72rem; color: var(--text-dim); margin-bottom: 0.8rem; }
.edu-body ul { list-style: none; }
.edu-body li {
  font-size: 0.8rem;
  color: var(--text);
  padding-left: 1em;
  position: relative;
  margin-bottom: 0.3rem;
  line-height: 1.6;
}
.edu-body li::before { content: '›'; position: absolute; left: 0; color: var(--red); }

.languages-block { border-top: 1px solid var(--border); padding-top: 3rem; }

.lang-list { display: flex; gap: 3rem; flex-wrap: wrap; }
.lang-item { display: flex; flex-direction: column; gap: 0.25rem; }
.lang-name { font-family: var(--sans); font-weight: 700; font-size: 1rem; color: var(--white); }
.lang-level { font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.08em; text-transform: uppercase; }

/* ─── CONTACT ──────────────────────────────────────── */
#contact {
  background: var(--surface2);
  border-top: 1px solid var(--border);
}

.contact-inner {
  text-align: center;
  padding-top: 8rem;
  padding-bottom: 8rem;
}

.contact-heading {
  font-family: var(--sans);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1rem;
}

.contact-sub {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 3rem;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.contact-btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border: 1px solid var(--red);
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 2rem;
}
.contact-btn:hover { background: var(--red); }

.contact-links { display: flex; flex-direction: column; align-items: center; gap: 1rem; }

.contact-socials { display: flex; gap: 1.2rem; }
.contact-socials a {
  color: var(--text-dim);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.contact-socials a svg { width: 22px; height: 22px; }
.contact-socials a:hover { color: var(--white); }

/* ─── FOOTER ───────────────────────────────────────── */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.2rem 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--text-mute);
  position: relative;
  z-index: 1;
  max-width: 100%;
}
.footer-note { color: var(--text-mute); }

/* ─── SCROLL REVEAL DEFAULTS ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
