/* =====================================================================
   Joy Biswas — Portfolio
   Design system: deep ink surfaces, amber-gold signature accent,
   disciplined cyan for AI cues. Space Grotesk / Inter / JetBrains Mono.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Surfaces */
  --ink-900: #0a0c10;
  --ink-850: #0e1116;
  --ink-800: #12161d;
  --ink-750: #161b23;
  --ink-700: #1c222c;
  --line: #232a35;
  --line-soft: #1a2029;

  /* Text */
  --text-hi: #f3f5f8;
  --text: #c3cad6;
  --text-mid: #8b95a5;
  --text-dim: #626c7c;

  /* Accents */
  --gold: #f5b13d;
  --gold-soft: #ffcf7a;
  --gold-deep: #d8901f;
  --cyan: #4fd4d9;
  --cyan-deep: #2aa7ad;

  /* Effects */
  --grad-gold: linear-gradient(135deg, #ffd98a 0%, #f5b13d 45%, #e0921f 100%);
  --grad-text: linear-gradient(120deg, #ffe0a3 0%, #f5b13d 60%);
  --glow-gold: 0 0 60px -12px rgba(245, 177, 61, 0.55);
  --shadow-card: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  --shadow-lift: 0 28px 60px -28px rgba(0, 0, 0, 0.9);

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Metrics */
  --container: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--ink-900);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

svg {
  display: block;
}

::selection {
  background: rgba(245, 177, 61, 0.28);
  color: #fff;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad-gold);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 900;
  padding: 18px 0;
  transition: padding 0.3s var(--ease), background 0.3s var(--ease),
    border-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  padding: 12px 0;
  background: rgba(10, 12, 16, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--grad-gold);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  box-shadow: var(--glow-gold);
  flex-shrink: 0;
}

.brand-text {
  color: var(--text-hi);
  font-size: 17px;
  letter-spacing: -0.2px;
}

.brand-dot {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 9px 15px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-mid);
  border-radius: 9px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav-link:hover {
  color: var(--text-hi);
}

.nav-link.active {
  color: var(--text-hi);
}

.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link.nav-cta {
  margin-left: 8px;
  color: var(--ink-900);
  background: var(--grad-gold);
  font-weight: 600;
}

.nav-link.nav-cta::after {
  display: none;
}

.nav-link.nav-cta:hover {
  filter: brightness(1.07);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-hi);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 11px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1px;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}

.btn svg {
  transition: transform 0.25s var(--ease);
}

.btn-primary {
  background: var(--grad-gold);
  color: var(--ink-900);
  box-shadow: 0 10px 30px -12px rgba(245, 177, 61, 0.7);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -12px rgba(245, 177, 61, 0.85);
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

.btn-ghost {
  background: var(--ink-750);
  color: var(--text-hi);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  color: var(--gold-soft);
}

.btn-ghost:hover svg {
  transform: translateY(2px);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 130px 0 80px;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 60% at 60% 30%, #000 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 60% 30%, #000 25%, transparent 75%);
  opacity: 0.5;
}

.hero-glow {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(245, 177, 61, 0.16) 0%, transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--gold-soft);
  padding: 7px 14px;
  border: 1px solid rgba(245, 177, 61, 0.25);
  border-radius: 100px;
  background: rgba(245, 177, 61, 0.06);
  margin-bottom: 26px;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5.6vw, 4.15rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text-hi);
  margin-bottom: 24px;
}

.hero-title .accent {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 17.5px;
  color: var(--text-mid);
  max-width: 33em;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text-hi);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 6px;
  letter-spacing: 0.2px;
}

/* Portrait */
.hero-portrait {
  position: relative;
  justify-self: center;
}

.portrait-frame {
  position: relative;
  width: min(400px, 78vw);
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(150deg, rgba(245, 177, 61, 0.85), rgba(79, 212, 217, 0.55) 55%, rgba(245, 177, 61, 0.6));
  box-shadow: var(--shadow-lift);
}

.portrait-frame img {
  display: block;
  width: 100%;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--ink-900, #0a0c10);
}

.portrait-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-hi);
  background: rgba(10, 12, 16, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 100px;
}

.portrait-badge .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #46d17f;
  box-shadow: 0 0 0 0 rgba(70, 209, 127, 0.7);
  animation: ring 1.8s infinite;
}

@keyframes ring {
  0% {
    box-shadow: 0 0 0 0 rgba(70, 209, 127, 0.6);
  }

  70% {
    box-shadow: 0 0 0 9px rgba(70, 209, 127, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(70, 209, 127, 0);
  }
}

.portrait-chip {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-hi);
  padding: 8px 13px;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  animation: float 5s ease-in-out infinite;
}

.chip-1 {
  top: 8%;
  left: -8%;
  color: var(--gold-soft);
}

.chip-2 {
  top: 42%;
  right: -12%;
  animation-delay: 1.4s;
  color: var(--cyan);
}

.chip-3 {
  bottom: 10%;
  left: -12%;
  animation-delay: 0.7s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-11px);
  }
}

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--line);
  border-radius: 14px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
}

.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: var(--gold);
  animation: scroll-dot 1.8s infinite;
}

@keyframes scroll-dot {
  0% {
    opacity: 0;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
  }

  80%,
  100% {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line-soft);
  background: var(--ink-850);
  overflow: hidden;
  padding: 18px 0;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee-track span {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
}

.marquee-track .sep {
  color: var(--gold);
}

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

/* ---------- Sections ---------- */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--ink-850);
  border-block: 1px solid var(--line-soft);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 52px;
}

.section-index {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  padding-top: 4px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-hi);
  white-space: nowrap;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.about-lead p {
  font-size: 17px;
  color: var(--text);
  margin-bottom: 18px;
}

.about-lead strong {
  color: var(--gold-soft);
  font-weight: 600;
}

.about-facts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-800);
}

.about-facts li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.about-facts li:last-child {
  border-bottom: none;
}

.fact-key {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fact-val {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-hi);
  text-align: right;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 28px 24px;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 177, 61, 0.4);
  box-shadow: var(--shadow-card);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(245, 177, 61, 0.1);
  color: var(--gold);
  margin-bottom: 18px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-hi);
  margin-bottom: 9px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ---------- Timeline ---------- */
.timeline-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.timeline-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-hi);
  margin-bottom: 30px;
}

.timeline-heading svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
}

.timeline {
  position: relative;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--line), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 34px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -26px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink-900);
  border: 2px solid var(--gold);
}

.timeline-dot::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: var(--gold);
  transform: scale(0);
  transition: transform 0.3s var(--ease);
}

.timeline-item:hover .timeline-dot::after {
  transform: scale(1);
}

.timeline-date {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.3px;
  margin-bottom: 7px;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-hi);
  letter-spacing: -0.01em;
}

.timeline-org {
  font-size: 14px;
  font-weight: 500;
  color: var(--cyan);
  margin: 3px 0 8px;
}

.timeline-text {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-group {
  padding: 26px 24px;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease);
}

.skill-group:hover {
  border-color: rgba(245, 177, 61, 0.35);
}

.skill-group-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--gold-soft);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  padding: 6px 12px;
  background: var(--ink-750);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.tag-list li:hover {
  transform: translateY(-2px);
  color: var(--gold-soft);
  border-color: var(--gold-deep);
}

/* ---------- Projects ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.filter-btn {
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.filter-btn:hover {
  color: var(--text-hi);
  border-color: var(--gold-deep);
}

.filter-btn.active {
  color: var(--ink-900);
  background: var(--grad-gold);
  border-color: transparent;
  font-weight: 600;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease), opacity 0.35s var(--ease);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 177, 61, 0.42);
  box-shadow: var(--shadow-lift);
}

.project-card.hide {
  display: none;
}

.project-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-750);
  display: grid;
  place-items: center;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.project-card:hover .project-thumb img {
  transform: scale(1.06);
}

.thumb-icon {
  width: 64px;
  height: 64px;
  color: rgba(255, 255, 255, 0.85);
  opacity: 0.9;
}

.thumb-gradient-1 {
  background: linear-gradient(135deg, #1b2a4a, #2a3f6b);
}

.thumb-gradient-2 {
  background: linear-gradient(135deg, #3a2140, #5a2f57);
}

.thumb-gradient-3 {
  background: linear-gradient(135deg, #123536, #1d5352);
}

.thumb-gradient-4 {
  background: linear-gradient(135deg, #402a12, #6b471d);
}

.project-kicker {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-hi);
  padding: 5px 10px;
  background: rgba(10, 12, 16, 0.6);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.project-kicker.on-image {
  background: rgba(10, 12, 16, 0.78);
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 22px 24px;
}

.project-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-hi);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 4px;
}

.project-tech li {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  padding: 4px 9px;
  background: var(--ink-750);
  border-radius: 6px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gold);
  transition: gap 0.2s var(--ease), color 0.2s var(--ease);
}

.project-link:hover {
  gap: 10px;
  color: var(--gold-soft);
}

/* ---------- Publications ---------- */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pub-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 26px 4px;
  border-top: 1px solid var(--line-soft);
  transition: background 0.25s var(--ease);
}

.pub-item:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.pub-item:hover {
  background: linear-gradient(90deg, rgba(245, 177, 61, 0.04), transparent);
}

.pub-year {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  padding-top: 2px;
}

.pub-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-hi);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.pub-venue {
  font-size: 14px;
  color: var(--text-mid);
}

.pub-link {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  transition: color 0.2s var(--ease);
}

.pub-link:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* ---------- Certificates ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.cert-card {
  position: relative;
  padding: 24px 22px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.cert-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--grad-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.cert-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 177, 61, 0.4);
}

.cert-card:hover::before {
  transform: scaleX(1);
}

.cert-issuer {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.cert-name {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text-hi);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.cert-card.highlight {
  background: linear-gradient(150deg, rgba(245, 177, 61, 0.14), var(--ink-800) 60%);
  border-color: rgba(245, 177, 61, 0.35);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-headline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-hi);
  margin-bottom: 16px;
}

.contact-sub {
  font-size: 16px;
  color: var(--text-mid);
  margin-bottom: 34px;
  max-width: 38em;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.contact-methods a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 16px;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.contact-methods a:hover {
  transform: translateX(4px);
  border-color: rgba(245, 177, 61, 0.4);
}

.cm-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(245, 177, 61, 0.1);
  color: var(--gold);
  flex-shrink: 0;
}

.cm-icon svg {
  width: 20px;
  height: 20px;
}

.cm-text {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-hi);
}

.cm-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1px;
}

.social-row {
  display: flex;
  gap: 12px;
}

.social-row a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--ink-800);
  border: 1px solid var(--line);
  color: var(--text-mid);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.social-row a svg {
  width: 20px;
  height: 20px;
}

.social-row a:hover {
  transform: translateY(-3px);
  color: var(--ink-900);
  background: var(--grad-gold);
  border-color: transparent;
}

/* Form */
.contact-form {
  padding: 30px;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-hi);
  background: var(--ink-750);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-dim);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 177, 61, 0.14);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0;
  background: var(--ink-850);
  border-top: 1px solid var(--line-soft);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-hi);
}

.footer-role {
  font-size: 13px;
  color: var(--text-dim);
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-nav a {
  font-size: 14px;
  color: var(--text-mid);
  transition: color 0.2s var(--ease);
}

.footer-nav a:hover {
  color: var(--gold);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .eyebrow {
    margin-inline: auto;
  }

  .hero-lead {
    margin-inline: auto;
  }

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

  .hero-portrait {
    order: -1;
  }

  .about-grid,
  .timeline-columns,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 82vw);
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    padding: 40px 28px;
    background: var(--ink-850);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    box-shadow: -30px 0 60px -20px rgba(0, 0, 0, 0.7);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 17px;
    padding: 14px 16px;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link.nav-cta {
    margin-left: 0;
    margin-top: 12px;
    text-align: center;
  }

  .nav-toggle {
    display: flex;
    z-index: 950;
  }

  .section {
    padding: 76px 0;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .hero-stats {
    gap: 28px;
  }
}

@media (max-width: 520px) {
  .container {
    padding-inline: 18px;
  }

  .cards-grid,
  .skills-grid,
  .project-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .stat-num {
    font-size: 1.7rem;
  }

  .pub-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .brand-text {
    font-size: 15px;
  }

  .contact-form {
    padding: 22px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
