/* ============================================================
   portfolio.css — Portfolio-specific styles
   Aesthetic: Dark Editorial · Gold Precision · Swiss–Italian
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --nav-h: 68px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Body offset for fixed nav */
body {
  padding-top: var(--nav-h);
}

/* ============================================================
   CURSOR FOLLOWER (desktop only)
   ============================================================ */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease, opacity 0.3s ease, width 0.25s ease, height 0.25s ease, background 0.25s ease;
  opacity: 0;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 32px; height: 32px;
  border: 1.5px solid rgba(240, 180, 41, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s var(--ease-out-expo), opacity 0.3s ease,
              width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo);
  opacity: 0;
}
body.cursor-ready .cursor-dot,
body.cursor-ready .cursor-ring { opacity: 1; }
body.cursor-hovering .cursor-dot {
  width: 10px; height: 10px;
  background: var(--color-accent);
}
body.cursor-hovering .cursor-ring {
  width: 52px; height: 52px;
  border-color: rgba(240, 180, 41, 0.25);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.pf-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.45s ease, border-color 0.45s ease, transform 0.35s var(--ease-out-expo);
  animation: navDrop 0.7s var(--ease-out-expo) 0.1s both;
}

@keyframes navDrop {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.pf-nav.is-scrolled {
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: rgba(51, 51, 51, 0.8);
}

.pf-nav.is-hidden {
  transform: translateY(-100%);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

/* --- Logo --- */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo__img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  transition: transform 0.4s var(--ease-out-expo), filter 0.3s ease;
  filter: brightness(1);
}

.nav-logo:hover .nav-logo__img {
  transform: scale(1.08) rotate(-2deg);
  filter: brightness(1.15) drop-shadow(0 0 8px rgba(240,180,41,0.4));
}

.nav-logo__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.nav-logo__name {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-white);
  letter-spacing: -0.01em;
  transition: color var(--transition);
}

.nav-logo__name em {
  font-style: normal;
  color: var(--color-accent);
}

.nav-logo:hover .nav-logo__name {
  color: var(--color-accent);
}

.nav-logo__sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  margin-top: 2px;
}

/* --- Nav links --- */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-secondary);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: var(--space-4);
  right: var(--space-4);
  height: 1.5px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out-expo);
}

.nav-link:hover {
  color: var(--color-white);
  background: rgba(255,255,255,0.04);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link.is-active {
  color: var(--color-white);
}

.nav-link--portal {
  margin-left: var(--space-2);
  color: var(--color-accent);
  border: 1px solid rgba(240, 180, 41, 0.25);
  background: rgba(240, 180, 41, 0.04);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-link--portal:hover {
  background: rgba(240, 180, 41, 0.1);
  border-color: rgba(240, 180, 41, 0.5);
  color: var(--color-accent);
}

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

/* --- Home-page nav animations --- */
.pf-nav--home .nav-logo__img {
  animation: navLogoIn 0.9s var(--ease-out-expo) 0.25s both,
             navLogoSpin 14s linear 1.2s infinite;
}

.pf-nav--home .nav-logo__name,
.pf-nav--home .nav-logo__sub {
  opacity: 0;
  animation: navWordIn 0.7s var(--ease-out-expo) 0.55s both;
}
.pf-nav--home .nav-logo__sub { animation-delay: 0.7s; }

.pf-nav--home .nav-links > li {
  opacity: 0;
  transform: translateY(-10px);
  animation: navLinkIn 0.55s var(--ease-out-expo) both;
}
.pf-nav--home .nav-links > li:nth-child(1) { animation-delay: 0.45s; }
.pf-nav--home .nav-links > li:nth-child(2) { animation-delay: 0.55s; }
.pf-nav--home .nav-links > li:nth-child(3) { animation-delay: 0.65s; }
.pf-nav--home .nav-links > li:nth-child(4) { animation-delay: 0.75s; }
.pf-nav--home .nav-links > li:nth-child(5) { animation-delay: 0.85s; }
.pf-nav--home .nav-links > li:nth-child(6) { animation-delay: 0.95s; }

.pf-nav--home .nav-link {
  overflow: hidden;
}
.pf-nav--home .nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(240,180,41,0.18) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease-out-expo);
  pointer-events: none;
}
.pf-nav--home .nav-link:hover::before {
  transform: translateX(120%);
}

.pf-nav--home .nav-logo:hover .nav-logo__img {
  animation-play-state: paused;
}

.pf-nav--home .nav-link--portal {
  position: relative;
  isolation: isolate;
}
.pf-nav--home .nav-link--portal::before {
  background: linear-gradient(120deg, transparent 30%, rgba(240,180,41,0.35) 50%, transparent 70%);
}

@keyframes navLogoIn {
  from { opacity: 0; transform: scale(0.4) rotate(-90deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes navLogoSpin {
  0%, 85% { transform: rotate(0); }
  92%      { transform: rotate(8deg); }
  100%    { transform: rotate(0); }
}

@keyframes navWordIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes navLinkIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .pf-nav--home .nav-logo__img,
  .pf-nav--home .nav-logo__name,
  .pf-nav--home .nav-logo__sub,
  .pf-nav--home .nav-links > li {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .pf-nav--home .nav-link::before { display: none; }
}

/* --- Hamburger --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 300;
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.35s var(--ease-out-expo), opacity 0.2s ease, background 0.2s ease;
  transform-origin: center;
}

.nav-toggle.is-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
  background: var(--color-accent);
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
  background: var(--color-accent);
}

/* --- Mobile overlay --- */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.nav-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}

/* ============================================================
   SCROLL REVEAL SYSTEM
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity  0.75s var(--ease-out-expo),
    transform 0.75s var(--ease-out-expo);
}

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

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }
.reveal[data-delay="6"] { transition-delay: 0.6s; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-16) var(--space-8) calc(var(--space-16) + 60px);
  isolation: isolate;
}

/* Layered background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(240, 180, 41, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 70%, rgba(240, 180, 41, 0.03) 0%, transparent 50%);
  z-index: -2;
  pointer-events: none;
}

/* Subtle grid */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: -1;
  mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 80%);
  pointer-events: none;
}

/* Parallax container (moved by JS) */
.hero__parallax {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 65% 45%, rgba(240,180,41,0.12) 0%, transparent 50%);
  z-index: -1;
  will-change: transform;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
  width: 100%;
}

/* Eyebrow */
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  margin-bottom: var(--space-6);
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-out-expo) 0.3s both;
}

/* Hero headline — text reveal lines */
.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 10vw, 6.5rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--color-white);
  margin-bottom: var(--space-8);
  letter-spacing: -0.02em;
}

.reveal-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em; /* prevent descender clip */
}

.reveal-line > span {
  display: block;
  animation: slideUp 1s var(--ease-out-expo) both;
}

.reveal-line:nth-child(1) > span { animation-delay: 0.4s; }
.reveal-line:nth-child(2) > span { animation-delay: 0.58s; }
.reveal-line:nth-child(3) > span { animation-delay: 0.72s; }

@keyframes slideUp {
  from { transform: translateY(105%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

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

.hero-accent { color: var(--color-accent); }
.hero-accent-italic { color: var(--color-accent); font-style: italic; }

.hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--color-secondary);
  margin-bottom: var(--space-10);
  line-height: 1.8;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out-expo) 0.85s both;
}

.cta-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out-expo) 1s both;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-10);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s var(--ease-out-expo);
  overflow: hidden;
  will-change: transform;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.06);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.btn:hover::before { opacity: 1; }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-void);
  border: 1px solid var(--color-accent);
}
.btn-primary:hover {
  background: transparent;
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(240, 180, 41, 0.2);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border-light);
}
.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* Magnetic effect target */
.btn.is-magnetic { will-change: transform; }

/* ============================================================
   SCROLL INDICATOR
   ============================================================ */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  z-index: 2;
  animation: scrollBob 2.5s ease-in-out infinite, fadeUp 0.7s ease 1.4s both;
  opacity: 0;
}

.scroll-indicator__label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-muted);
}

.scroll-indicator__line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
}

@keyframes scrollBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   SECTION LAYOUT
   ============================================================ */
section {
  padding: var(--space-16) 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  font-style: italic;
  color: var(--color-white);
  text-align: center;
  margin-bottom: var(--space-4);
  position: relative;
  letter-spacing: -0.01em;
}

.section-subtitle {
  text-align: center;
  color: var(--color-secondary);
  font-size: var(--text-md);
  margin-bottom: var(--space-12);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Underline that grows on reveal */
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--color-accent);
  margin: var(--space-4) auto 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out-expo) 0.3s;
}
.section-title.is-visible::after {
  transform: scaleX(1);
}

/* ============================================================
   WORK GRID / PROJECT CARDS
   ============================================================ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
}

.project-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.45s var(--ease-out-expo),
    box-shadow 0.45s var(--ease-out-expo),
    border-color 0.3s ease;
}

/* Gold top accent line */
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out-expo);
  z-index: 1;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(240, 180, 41, 0.2);
  border-color: rgba(240, 180, 41, 0.3);
}

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

.project-header {
  height: 220px;
  background: linear-gradient(135deg, var(--color-steel) 0%, #1e1e1e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.project-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(240,180,41,0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-card:hover .project-header::after { opacity: 1; }

.project-emoji {
  font-size: 3.5rem;
  line-height: 1;
  filter: grayscale(0.2);
  transition: transform 0.4s var(--ease-out-expo), filter 0.3s ease;
}
.project-card:hover .project-emoji {
  transform: scale(1.12) rotate(-3deg);
  filter: grayscale(0);
}

.project-content {
  padding: var(--space-8);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.project-description {
  color: var(--color-secondary);
  font-size: var(--text-base);
  line-height: 1.65;
  flex: 1;
  margin-bottom: var(--space-6);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.tech-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 3px var(--space-3);
  background: var(--color-steel);
  color: var(--color-accent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.project-card:hover .tech-badge {
  background: rgba(240,180,41,0.06);
  border-color: rgba(240,180,41,0.25);
}

.project-links { display: flex; gap: var(--space-3); }

.project-link {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  text-decoration: none;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.25s ease;
}
.project-link:hover {
  background: var(--color-accent);
  color: var(--color-void);
  border-color: var(--color-accent);
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
  margin-top: var(--space-12);
}

.about-bio {
  color: var(--color-secondary);
  line-height: 1.85;
  font-size: var(--text-md);
}
.about-bio p { margin-bottom: var(--space-8); }
.about-bio strong { color: var(--color-accent); font-weight: 600; }

.skills-section h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 600;
  color: var(--color-white);
  margin-top: var(--space-10);
  margin-bottom: var(--space-6);
}
.skills-section h3:first-child { margin-top: 0; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-4);
}

.skill-item {
  background: var(--color-steel);
  padding: var(--space-5);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  text-align: center;
  transition: all 0.35s var(--ease-out-expo);
}
.skill-item:hover {
  border-color: var(--color-accent);
  background: rgba(240,180,41,0.05);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.skill-item h4 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.skill-item p {
  font-size: var(--text-xs);
  color: var(--color-secondary);
  line-height: 1.5;
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding: var(--space-8) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--color-border) 10%, var(--color-border) 90%, transparent);
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-10);
  align-items: start;
}

.timeline-item:nth-child(odd) .timeline-content { grid-column: 1; }
.timeline-item:nth-child(odd) .timeline-marker   { grid-column: 2; }
.timeline-item:nth-child(odd) .timeline-empty    { grid-column: 3; }

.timeline-item:nth-child(even) .timeline-empty   { grid-column: 1; }
.timeline-item:nth-child(even) .timeline-marker  { grid-column: 2; }
.timeline-item:nth-child(even) .timeline-content { grid-column: 3; }

.timeline-marker {
  display: flex;
  justify-content: center;
  padding-top: var(--space-4);
}
.timeline-dot {
  width: 10px; height: 10px;
  background: var(--color-accent);
  border-radius: 50%;
  border: 2px solid var(--color-void);
  box-shadow: 0 0 0 3px rgba(240,180,41,0.25);
  transition: box-shadow 0.3s ease;
}
.timeline-item:hover .timeline-dot {
  box-shadow: 0 0 0 6px rgba(240,180,41,0.15);
}

.timeline-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-8);
  transition: border-color 0.3s ease, transform 0.35s var(--ease-out-expo);
}
.timeline-item:hover .timeline-content {
  border-color: rgba(240,180,41,0.25);
  transform: translateY(-2px);
}
.timeline-content h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-1);
}
.timeline-content .year {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}
.timeline-content p { color: var(--color-secondary); font-size: var(--text-base); line-height: 1.6; }

/* ============================================================
   PACKAGES
   ============================================================ */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
  align-items: stretch;
}

.package-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-10);
  display: flex;
  flex-direction: column;
  transition: all 0.4s var(--ease-out-expo);
}

.package-card:hover {
  border-color: rgba(240,180,41,0.3);
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.4);
}

.package-card.featured {
  border-color: var(--color-accent);
  background: linear-gradient(160deg, rgba(240,180,41,0.09) 0%, var(--color-surface) 60%);
  transform: scale(1.06);
  padding: calc(var(--space-10) + 6px);
  box-shadow: 0 0 0 1px rgba(240,180,41,0.25), 0 20px 60px rgba(240,180,41,0.12);
}
.package-card.featured:hover {
  transform: scale(1.06) translateY(-6px);
  box-shadow: 0 0 0 1px rgba(240,180,41,0.4), 0 28px 64px rgba(240,180,41,0.18);
}

.package-badge {
  display: inline-block;
  align-self: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--color-accent);
  color: var(--color-void);
  padding: var(--space-1) var(--space-5);
  border-radius: 100px;
  margin-bottom: var(--space-6);
}

.package-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-white);
  text-align: center;
  margin-bottom: var(--space-4);
}

.package-price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-accent);
  text-align: center;
  line-height: 1;
  margin-bottom: var(--space-1);
}

.package-description {
  color: var(--color-text);
  font-size: var(--text-lg);
  font-weight: 500;
  text-align: center;
  margin-bottom: var(--space-6);
  line-height: 1.5;
  background: linear-gradient(90deg, transparent 0%, rgba(240,180,41,0.08) 40%, rgba(240,180,41,0.08) 60%, transparent 100%);
  border-radius: 999px;
  padding: var(--space-3) var(--space-8);
}

.package-price-period {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-8);
}

.package-features {
  list-style: none;
  margin-bottom: var(--space-8);
  flex: 1;
}
.package-features li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-secondary);
  font-size: var(--text-sm);
  transition: color 0.2s ease;
}
.package-features li:last-child { border-bottom: none; }
.package-features li::before {
  content: '';
  display: block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}
.package-card:hover .package-features li { color: var(--color-text); }

.package-cta {
  display: block;
  text-align: center;
  padding: var(--space-4) var(--space-6);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.3s var(--ease-out-expo);
}
.package-cta:hover {
  background: var(--color-accent);
  color: var(--color-void);
  box-shadow: 0 8px 24px rgba(240,180,41,0.2);
}

.trust-bar {
  display: flex;
  justify-content: center;
  gap: var(--space-10);
  margin-top: var(--space-12);
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.trust-icon {
  font-size: 1.1rem;
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-container {
  max-width: 620px;
  margin: var(--space-12) auto 0;
}

.form-group { margin-bottom: var(--space-6); }

label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  margin-bottom: var(--space-3);
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: var(--color-steel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  outline: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-5) center;
  padding-right: calc(var(--space-5) + 20px);
  cursor: pointer;
}

select option {
  background: var(--color-surface);
  color: var(--color-text);
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  border-color: var(--color-accent);
  background: rgba(255,255,255,0.03);
  box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.08);
}

textarea { resize: vertical; min-height: 140px; }

.form-submit {
  width: 100%;
  padding: var(--space-4) var(--space-8);
  background: var(--color-accent);
  color: var(--color-void);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  margin-top: var(--space-4);
}
.form-submit:hover {
  background: transparent;
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(240,180,41,0.15);
}

.form-message {
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius);
  margin-bottom: var(--space-8);
  font-size: var(--text-sm);
  display: none;
}
.form-message.success {
  display: block;
  background: rgba(76, 175, 80, 0.08);
  border: 1px solid rgba(76, 175, 80, 0.4);
  color: #6fcf6f;
}
.form-message.error {
  display: block;
  background: rgba(232, 84, 30, 0.08);
  border: 1px solid rgba(232, 84, 30, 0.4);
  color: var(--color-danger);
}

/* ============================================================
   FOOTER
   ============================================================ */
.pf-footer {
  background: var(--color-base);
  border-top: 1px solid var(--color-border);
  padding: var(--space-16) 0 0;
  margin-top: var(--space-16);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8) var(--space-12);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-16);
  align-items: start;
}

.footer-brand { display: flex; flex-direction: column; gap: var(--space-6); }

.footer-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
  opacity: 0.75;
  transition: opacity 0.3s ease, transform 0.4s var(--ease-out-expo);
}
.footer-logo-img:hover {
  opacity: 1;
  transform: scale(1.06) rotate(-2deg);
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--color-secondary);
  line-height: 1.4;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.footer-col__title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  margin-bottom: var(--space-5);
}

.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }

.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.footer-col a:hover { color: var(--color-accent); }
.footer-col a:hover::before {
  content: '→';
  font-size: var(--text-xs);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: var(--space-6) var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--color-muted);
  font-family: var(--font-mono);
}

.footer-bottom__made {
  font-style: italic;
  font-family: var(--font-display) !important;
  font-size: var(--text-sm) !important;
  color: rgba(240,180,41,0.4) !important;
}

/* ============================================================
   PAGE HEADER (inner pages — non-hero)
   ============================================================ */
.page-hero {
  padding: var(--space-16) 0 var(--space-12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.4;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  font-style: italic;
  color: var(--color-white);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.page-hero p {
  margin-top: var(--space-4);
  color: var(--color-secondary);
  font-size: var(--text-md);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ============================================================
   FEATURE / INFO CARDS (generic)
   ============================================================ */
.info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-8);
  transition: border-color 0.3s ease, transform 0.35s var(--ease-out-expo);
}
.info-card:hover {
  border-color: rgba(240,180,41,0.25);
  transform: translateY(-3px);
}
.info-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.info-card p { color: var(--color-secondary); font-size: var(--text-sm); line-height: 1.65; }

/* ============================================================
   HERO LOGO WATERMARK
   ============================================================ */
.hero__logo-watermark {
  position: absolute;
  right: -2%;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(480px, 62vw, 960px);
  height: auto;
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(0 0 80px rgba(240, 180, 41, 0.4));
  animation: watermarkFloat 12s ease-in-out infinite;
}

@keyframes watermarkFloat {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50%       { transform: translateY(-52%) scale(1.03); }
}

@media (max-width: 900px) {
  .hero__logo-watermark {
    right: 50%;
    transform: translate(50%, -50%);
    width: clamp(380px, 92vw, 680px);
    opacity: 0.18;
    animation: none;
  }
}

/* ============================================================
   HERO PARTICLES
   ============================================================ */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hero-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 50%;
  opacity: 0;
  animation: particleDrift var(--dur, 12s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes particleDrift {
  0%   { opacity: 0; transform: translateY(0) translateX(0) scale(0); }
  10%  { opacity: 0.6; transform: translateY(-10px) scale(1); }
  90%  { opacity: 0.3; transform: translateY(var(--dy, -120px)) translateX(var(--dx, 20px)) scale(0.5); }
  100% { opacity: 0; transform: translateY(var(--dy, -140px)) scale(0); }
}

/* ============================================================
   STATS / COUNTER ROW
   ============================================================ */
.stats-row {
  display: flex;
  gap: var(--space-10);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-12);
  padding-top: var(--space-10);
  border-top: 1px solid var(--color-border);
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out-expo) 1.2s both;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  display: block;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: var(--space-2);
  display: block;
}

/* ============================================================
   TECH BADGE SHIMMER
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.project-card:hover .tech-badge {
  background: rgba(240,180,41,0.06);
  border-color: rgba(240,180,41,0.25);
  background-image: linear-gradient(
    105deg,
    transparent 40%,
    rgba(240,180,41,0.15) 50%,
    transparent 60%
  );
  background-size: 200% auto;
  animation: shimmer 1.4s linear infinite;
}

/* ============================================================
   BROWSER MOCKUP PROJECT HEADERS
   ============================================================ */
.project-header--browser {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}

.browser-chrome {
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.browser-dot--red   { background: #ff5f57; }
.browser-dot--yellow{ background: #ffbd2e; }
.browser-dot--green { background: #28c840; }

.browser-address {
  flex: 1;
  height: 20px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--color-muted);
  letter-spacing: 0.02em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.browser-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

/* Code-lines shimmer inside browser screen */
.browser-code-lines {
  position: absolute;
  inset: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  opacity: 0.18;
}

.code-line {
  height: 7px;
  background: var(--color-muted);
  border-radius: 3px;
  transform-origin: left;
}

.code-line--accent { background: var(--color-accent); }
.code-line--short  { width: 45%; }
.code-line--medium { width: 68%; }
.code-line--long   { width: 85%; }
.code-line--full   { width: 100%; }

.browser-logo-overlay {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 4px 20px rgba(240,180,41,0.35));
  transition: transform 0.4s var(--ease-out-expo), filter 0.3s ease;
}

.project-card:hover .browser-logo-overlay {
  transform: scale(1.12) rotate(-3deg);
  filter: drop-shadow(0 6px 28px rgba(240,180,41,0.55));
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .about-content { grid-template-columns: 1fr; gap: var(--space-10); }
  .footer-inner  { grid-template-columns: 1fr; gap: var(--space-10); }
  .footer-nav    { grid-template-columns: repeat(2, 1fr); }

  .timeline::before { left: 20px; transform: none; }
  .timeline-item {
    display: block;
    padding-left: 52px;
    position: relative;
    margin-bottom: var(--space-8);
  }
  .timeline-marker {
    position: absolute;
    left: 12px;
    top: var(--space-4);
    width: auto;
    padding: 0;
  }
  .timeline-empty  { display: none; }
  .timeline-content { all: unset; display: block; }
  .timeline-item .timeline-content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-6) var(--space-8);
  }
}

@media (max-width: 768px) {
  /* --- Show hamburger, hide desktop links --- */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 85vw);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
    background: var(--color-base);
    border-left: 1px solid var(--color-border);
    padding: calc(var(--nav-h) + var(--space-8)) var(--space-6) var(--space-8);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out-expo);
    z-index: 250;
    overflow-y: auto;
  }

  .nav-links.is-open {
    transform: translateX(0);
    box-shadow: -20px 0 60px rgba(0,0,0,0.5);
  }

  .nav-links li { width: 100%; }
  .nav-link {
    width: 100%;
    padding: var(--space-4) var(--space-4);
    font-size: var(--text-md);
    justify-content: flex-start;
  }

  .nav-link--portal {
    margin-left: 0;
    margin-top: var(--space-4);
  }

  /* Stagger mobile menu items */
  .nav-links li { opacity: 0; transform: translateX(20px); transition: opacity 0.3s ease, transform 0.3s ease; }
  .nav-links.is-open li:nth-child(1) { opacity:1; transform:none; transition-delay: 0.08s; }
  .nav-links.is-open li:nth-child(2) { opacity:1; transform:none; transition-delay: 0.13s; }
  .nav-links.is-open li:nth-child(3) { opacity:1; transform:none; transition-delay: 0.18s; }
  .nav-links.is-open li:nth-child(4) { opacity:1; transform:none; transition-delay: 0.23s; }
  .nav-links.is-open li:nth-child(5) { opacity:1; transform:none; transition-delay: 0.28s; }
  .nav-links.is-open li:nth-child(6) { opacity:1; transform:none; transition-delay: 0.33s; }

  /* Disable home-page entrance animation on mobile so the off-canvas
     stagger above can do its job when the menu is opened. */
  .pf-nav--home .nav-links > li {
    animation: none;
    opacity: 0;
    transform: translateX(20px);
  }
  .pf-nav--home .nav-link::before { display: none; }

  /* Layouts */
  .work-grid     { grid-template-columns: 1fr; }
  .packages-grid { grid-template-columns: 1fr; }
  .package-card.featured { transform: scale(1); }
  .cta-buttons   { flex-direction: column; align-items: stretch; }
  .btn           { width: 100%; justify-content: center; }
  .footer-nav    { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
  .nav-logo__sub { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-5); }
  .hero      { padding: var(--space-12) var(--space-5) calc(var(--space-12) + 56px); }
  .project-header { height: 180px; }
  .project-emoji  { font-size: 2.8rem; }
  .scroll-indicator__line { height: 28px; }
  .stats-row { gap: var(--space-6); margin-top: var(--space-8); padding-top: var(--space-6); }
}

/* ============================================================
   SCROLL INDICATOR — override for old inline SVG style
   ============================================================ */
.scroll-indicator svg {
  width: 20px; height: 20px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
