/* Portfolio — Unified Brutalist Design System */
/* Responsive: Mobile-first (default), Desktop at lg breakpoint */

:root {
  --bg: #000000;
  --text: #ffffff;
  --accent: #cccccc;
  --brand: #6fa596;
}

/* ═══════════════════════════════════════════════════════════════
   BASE RESET
══════════════════════════════════════════════════════════════ */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  text-transform: uppercase;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar,
html::-webkit-scrollbar {
  display: none;
}

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

a,
button {
  min-height: 44px;
  touch-action: manipulation;
}

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

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

#page-root {
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   CHROME BARS (Top/Bottom Frames)
══════════════════════════════════════════════════════════════ */

.chrome-bar {
  height: 2rem;
  overflow: hidden;
}

.chrome-track {
  width: 200%;
  height: 100%;
  display: flex;
  will-change: transform;
}

.chrome-segment {
  width: 50%;
  height: 100%;
  flex-shrink: 0;
}

.projects-desktop-frame-top,
.projects-desktop-frame-bottom {
  height: 2rem;
}

.desktop-chrome-bar {
  overflow: hidden;
}

.desktop-chrome-track {
  width: 200%;
  height: 100%;
  display: flex;
  will-change: transform;
}

.desktop-chrome-segment {
  width: 50%;
  height: 100%;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   BRUTAL UTILITIES
══════════════════════════════════════════════════════════════ */

html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.slash-bg-bw {
  background: repeating-linear-gradient(
    45deg,
    #000000,
    #000000 20px,
    #ffffff 20px,
    #ffffff 40px
  );
}

.brutal-border {
  border: 6px solid var(--text);
}

.brutal-border-black {
  border: 6px solid var(--bg);
}

.brutal-shadow {
  box-shadow: 12px 12px 0 0 var(--accent);
}

.brutal-shadow-white {
  box-shadow: 10px 10px 0 0 #ffffff;
}

.brutal-shadow-sm {
  box-shadow: 6px 6px 0 0 var(--accent);
}

.clip-diagonal {
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE SHELL (Default - shown below lg breakpoint)
══════════════════════════════════════════════════════════════ */

.mobile-shell {
  display: block;
}

.desktop-shell {
  display: none;
}

/* ─── Mobile Section Base ─────────────────────────────────────── */

.mobile-shell section {
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 2rem 0;
  box-sizing: border-box;
}

/* ─── Hero Section ─────────────────────────────────────────────── */

.mobile-hero-section {
  padding: 0 !important;
  justify-content: flex-start !important;
}

.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  text-align: center;
  z-index: 1;
  width: 100%;
  padding: 0;
}

/* Gyroscopic Image — full width, frame is static, image shifts inside */
.hero-gyro-wrapper {
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
}

.hero-gyro-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%);
}

.hero-gyro-img {
  /* Oversized so it can shift without showing edges */
  width: 100%;
  height: 100%;
  margin-left: 0;
  margin-top: 0;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.3);
  display: block;
  will-change: transform;
  transition: transform 0.08s linear;
  transform: translate(0, 0) scale(1);
}

/* Radial vignette overlay — matches desktop */
.hero-gyro-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 50%, rgba(0,0,0,0.8) 120%);
  pointer-events: none;
  z-index: 1;
}

/* Diagonal line pattern — matches desktop */
.hero-gyro-lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg,
      rgba(0,0,0,0.5),
      rgba(0,0,0,0.5) 2px,
      transparent 2px,
      transparent 8px);
  pointer-events: none;
  z-index: 2;
}

/* Hero text — big & bold on mobile */
.hero-title {
  font-family: "Anton", Impact, sans-serif;
  font-size: clamp(2.8rem, 14vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  color: #ffffff;
  margin: 0;
  padding: 0;
}

.hero-subtitle {
  font-family: "Anton", Impact, sans-serif;
  font-size: clamp(2rem, 7vw, 2.4rem);
  line-height: 1;
  display: inline-block;
  background: #000000;
  color: var(--brand);
  padding: 0.25rem 0.75rem;
  border: 4px solid #ffffff;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.hero-quote-box {
  max-width: 280px;
  padding: 0.85rem 1rem;
  border: 4px solid var(--text);
  box-shadow: 6px 6px 0 0 var(--brand);
  background: var(--bg);
  margin: 0 1rem;
}

.hero-quote-box p {
  font-family: "Space Grotesk", monospace;
  font-size: 0.72rem;
  line-height: 1.35;
  margin: 0;
}

/* ─── Expertise Section (Sticky Pin) ──────────────────────────── */

.mobile-expertise-section {
  /* Tall scrollable container so sticky has room to pin */
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  background: var(--bg);
}

.mobile-expertise-sticky {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.5rem 1rem 1rem;
  box-sizing: border-box;
  gap: 0.75rem;
}

.mobile-expertise-badge,
.mobile-projects-badge,
.mobile-contact-badge {
  display: inline-block;
  background: var(--bg);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border: 4px solid var(--text);
  box-shadow: 5px 5px 0 0 var(--text);
  transform: rotate(-2deg);
  align-self: flex-start;
  flex-shrink: 0;
  margin-bottom: 1rem;
}

.mobile-contact-badge {
  align-self: center;
  transform: rotate(1deg);
}

.mobile-exp-cards {
  display: flex;
  flex-direction: row;
  gap: 0.6rem;
  flex-shrink: 0;
}

.mobile-exp-cards .exp-sticker {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 4px solid #000;
  box-shadow: 5px 5px 0 0 var(--accent);
}

.mobile-exp-cards .exp-sticker-green {
  background: #b8dc8b;
  color: #000;
}
.mobile-exp-cards .exp-sticker-blue {
  background: #bae6fd;
  color: #000;
}

.mobile-exp-cards .exp-company-logo {
  height: 1.75rem;
  width: auto;
  object-fit: contain;
}

.mobile-exp-cards .exp-date {
  font-family: "Space Grotesk", monospace;
  font-size: 0.5rem;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 20px;
  padding: 0.15rem 0.4rem;
  white-space: nowrap;
}

.mobile-exp-cards .exp-role {
  font-family: "Anton", Impact, sans-serif;
  font-size: 1rem;
  line-height: 1.1;
  margin: 0.4rem 0 0;
  text-transform: uppercase;
}

.mobile-exp-cards .exp-employer {
  font-family: "Space Grotesk", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  margin: 0.2rem 0 0;
}

.mobile-exp-cards .exp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.2rem;
}

/* Gyroscopic stamps arena */
.mobile-stamps-arena {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
  border: 3px solid rgba(255, 255, 255, 0.1);
}

.mobile-stamps-container {
  position: absolute;
  inset: 0;
  /* stamps are absolutely positioned by JS */
}

.mobile-stamp {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  font-family: "Space Grotesk", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  border: 4px solid #000;
  white-space: nowrap;
  cursor: default;
  user-select: none;
  will-change: transform;
  /* physics set by JS */
}

.mobile-stamp iconify-icon {
  font-size: 1.1rem !important;
  line-height: 1;
}

/* ─── Projects Section ─────────────────────────────────────────── */

.mobile-projects-section {
  background: var(--bg);
  padding: 1.5rem 1rem !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start !important;
}

.mobile-projects-section .hero-description {
  flex-shrink: 0;
  margin-bottom: 1rem;
  font-size: 0.75rem;
}

.projects-list {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding-bottom: 2rem; /* space at bottom of scroll */
  scrollbar-width: none; /* Hide scrollbar for clean look */
}

.projects-list::-webkit-scrollbar {
  display: none;
}

/* ─── Contact Section ──────────────────────────────────────────── */

.mobile-contact-section {
  text-align: center;
  align-items: center;
  background: var(--bg);
  padding: 2rem 1rem !important;
  justify-content: center !important;
}

/* Sections */
.section {
  padding: 2rem 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-label {
  display: inline-block;
  background: var(--bg);
  color: var(--text);
  padding: 0.5rem 1rem;
  border: 4px solid var(--text);
  box-shadow: 6px 6px 0 0 var(--text);
  transform: rotate(-3deg);
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: "Anton", Impact, sans-serif;
  font-size: clamp(2rem, 8vw, 3.5rem);
  line-height: 1;
  margin: 0;
}

/* Experience Cards */
.exp-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.exp-card {
  padding: 1rem;
}

.exp-sticker {
  border: 4px solid var(--bg);
  box-shadow: 8px 8px 0 0 var(--accent);
  padding: 1rem;
}

.exp-sticker-green {
  background: #b8dc8b;
  color: #000;
}

.exp-sticker-blue {
  background: #bae6fd;
  color: #000;
}

.exp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exp-company-logo {
  height: 2rem;
  width: auto;
}

.exp-date {
  font-family: "Space Grotesk", monospace;
  font-size: 0.65rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.25rem 0.5rem;
  border-radius: 0;
}

.exp-role {
  font-family: "Anton", Impact, sans-serif;
  font-size: 1.5rem;
  line-height: 1.1;
  margin: 0;
  text-transform: uppercase;
}

.exp-employer {
  font-family: "Space Grotesk", monospace;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0.25rem 0 0;
}

/* Tech Strip */
.tech-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.tech-stamp {
  border: 6px solid var(--bg);
  border-radius: 0;
  padding: 0.75rem 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  max-width: max-content;
}

.tech-stamp iconify-icon {
  font-size: 1.5rem !important;
  line-height: 1;
}

/* Project Cards - Mobile Grid (Moved up to mobile-projects-section) */
.project-card {
  height: 100%;
}

.project-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.75rem !important;
}

.project-card-link span {
  font-size: 0.7rem !important;
  margin-top: 0.5rem !important;
  padding: 0.35rem !important;
}

/* Contact Section */
.contact-section {
  text-align: center;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.contact-title {
  font-family: "Anton", Impact, sans-serif;
  font-size: clamp(2rem, 10vw, 4rem);
  line-height: 1;
}

.contact-title span {
  color: var(--brand);
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding: 0 1rem;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  font-family: "Anton", Impact, sans-serif;
  font-size: 1.25rem;
  text-decoration: none;
  text-transform: uppercase;
  border: 4px solid var(--text);
  transition: all 0.15s ease;
  width: 100%;
}

.contact-btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 6px 6px 0 0 var(--brand);
}

.contact-btn-primary:hover {
  background: var(--brand);
  color: var(--text);
}

.contact-btn-secondary {
  background: var(--brand);
  color: var(--text);
}

.contact-btn-secondary:hover {
  background: var(--text);
  color: var(--bg);
}

/* Social Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.social-link {
  color: var(--text);
  font-size: 0.8rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem;
}

.social-link:hover {
  color: var(--brand);
}

/* ═══════════════════════════════════════════════════════════════
   DESKTOP SHELL (Shown at lg breakpoint and above)
══════════════════════════════════════════════════════════════ */

@media (min-width: 1024px) {
  /* Panel Layout */
  .panel {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
  }

  .mobile-shell {
    display: none;
  }

  .desktop-shell {
    display: block;
  }

  #horizontal-container {
    width: 400vw;
    height: 100vh;
    display: flex;
    flex-wrap: nowrap;
  }

  /* Desktop Hero */
  .hero-section {
    padding: 0;
  }

  .hero-stack {
    gap: 2rem;
  }

  .hero-bg-image {
    max-width: 500px;
  }

  .hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
  }

  .hero-subtitle {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    padding: 0.5rem 1rem;
    border-width: 6px;
  }

  .hero-quote-box {
    max-width: 400px;
    padding: 1.5rem;
    border-width: 6px;
  }

  .hero-quote-box p {
    font-size: 1rem;
  }

  /* Desktop Brutal Utilities */
  .brutal-border {
    border-width: 6px;
  }

  .brutal-border-black {
    border-width: 6px;
  }

  .brutal-shadow {
    box-shadow: 16px 16px 0 0 var(--accent);
  }

  .brutal-shadow-white {
    box-shadow: 12px 12px 0 0 #ffffff;
  }

  .brutal-shadow-sm {
    box-shadow: 8px 8px 0 0 var(--accent);
  }

  /* Experience Stickers */
  .exp-sticker {
    border-width: 6px;
    box-shadow: 16px 16px 0 0 var(--accent);
  }

  .tech-stamp {
    border-width: 4px;
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
  }

  .tech-stamp iconify-icon {
    font-size: 1rem !important;
  }

  /* Projects Desktop Frame */
  .projects-desktop-wrap {
    min-height: calc(100vh - 4rem);
    background: var(--bg);
    color: var(--text);
    padding: 2.5rem;
  }

  .projects-desktop-hero {
    max-width: 860px;
    margin-inline: auto;
  }

  .projects-desktop-kicker {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a6b9c6;
  }

  .projects-desktop-title {
    margin: 0.35rem 0 0;
    font-family: "Anton", Impact, sans-serif;
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 1;
    letter-spacing: 0.02em;
  }

  .projects-desktop-copy {
    margin: 0.7rem 0 0;
    color: #d0dae2;
    max-width: 54ch;
  }

  .projects-desktop-content {
    max-width: 1200px;
    margin: 2rem auto 0;
  }

  .projects-desktop-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
  }

  /* Desktop Project Cards */
  .projects-desktop-list .project-card {
    background: #0c0f12;
    border-color: #2e3942;
  }

  .projects-desktop-list .project-title,
  .projects-desktop-list .project-description,
  .projects-desktop-list .project-role,
  .projects-desktop-list .project-link-label {
    color: #e9f2f8;
  }

  .projects-desktop-list .project-media-wrap {
    background: #1a232a;
    border-color: #2f3b44;
  }

  .projects-desktop-list .project-tag {
    background: #1a242d;
    border-color: #374753;
    color: #d8e7f2;
  }

  /* Project Row Hover (Desktop) */
  .project-row {
    position: relative;
  }

  .project-image-preview {
    position: absolute;
    top: 50%;
    left: 70%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 350px;
    object-fit: cover;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    filter: grayscale(100%) contrast(1.2);
    visibility: hidden;
    border: 8px solid var(--accent);
    transition:
      opacity 0.3s ease,
      visibility 0.3s ease;
  }

  .project-row:hover .project-image-preview {
    opacity: 1;
    visibility: visible;
  }
}

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
