/* ============================================
   TRISTAN TREFZ — PORTFOLIO 2026
   Racing Glassmorphism — Ice Blue Edition
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,300&family=Barlow+Condensed:wght@400;600;700;800&display=swap');

:root {
  --bg:           #050810;
  --bg2:          #080c15;
  --glass:        rgba(10,20,50,0.55);
  --glass-hover:  rgba(15,30,70,0.7);
  --glass-border: rgba(80,140,255,0.12);
  --glass-glow:   rgba(60,120,255,0.08);
  --accent:       #4a9eff;        /* electric blue */
  --accent2:      #1a6fe8;        /* deep blue */
  --accent3:      #00d4ff;        /* cyan highlight */
  --accent-dim:   rgba(74,158,255,0.15);
  --text:         #eef2ff;
  --muted:        #5a6585;
  --font-head:    'Bebas Neue', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-cond:    'Barlow Condensed', sans-serif;
  --max-w:        1140px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── GLOBAL DIAGONAL GRID ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    repeating-linear-gradient(
      -70deg,
      transparent 0px, transparent 90px,
      rgba(74,158,255,0.025) 90px, rgba(74,158,255,0.025) 91px
    );
}

/* Inner page mood background (applied to body on non-home pages) */
body.inner-page::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url('bg/black-white-concrete-background.jpg') center / cover fixed;
  opacity: 0.04;
  filter: hue-rotate(200deg) saturate(0.3) brightness(0.6);
}

/* Blue semi-transparent gradient overlay for inner pages */
body.inner-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(5, 10, 30, 0.85) 0%,
    rgba(8, 20, 50, 0.75) 40%,
    rgba(3, 8, 25, 0.88) 100%
  );
}

/* ── TYPOGRAPHY ── */
h1 {
  font-family: var(--font-head);
  font-size: clamp(5rem, 13vw, 12rem);
  line-height: 0.85;
  letter-spacing: -0.01em;
}
h2 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.03em;
}
h3 {
  font-family: var(--font-cond);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
p { font-size: 1rem; line-height: 1.7; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }

/* ── LAYOUT ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2.5rem;
  position: relative; z-index: 2;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(5,8,16,0.75);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: 1px solid var(--glass-border);
}
nav::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--accent2) 0%, var(--accent3) 30%, transparent 70%);
  opacity: 0.6;
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.nav-logo {
  font-family: var(--font-head); font-size: 1.5rem; letter-spacing: 0.08em; color: var(--text);
}
.nav-logo span { color: var(--accent3); }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-family: var(--font-cond); font-size: 0.78rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); font-weight: 700;
  transition: color 0.2s; position: relative; padding-bottom: 2px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 1px;
  background: var(--accent3); transform: scaleX(0); transform-origin: left; transition: transform 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

/* ══════════════════════════════════
   HOME HERO — AGGRESSIVE SLANT
   ══════════════════════════════════ */
.home-hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

/* Full-bleed photo background */
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: url('bg/car-99-takes-the-lead-in-a-blur-of-speed.jpg') center center / cover no-repeat;
  filter: brightness(0.18) saturate(0.4);
}
/* Blue tint overlay */
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(5,8,16,0.9) 0%, rgba(10,20,60,0.6) 60%, rgba(0,40,100,0.3) 100%);
}

/* THE DIAGONAL SLASH — cuts across the hero */
.hero-slash {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  overflow: hidden;
}
.hero-slash::before {
  content: '';
  position: absolute;
  /* A thick angled stripe from top-left area down to bottom-right */
  top: -10%; left: 38%;
  width: 3px; height: 130%;
  background: linear-gradient(to bottom, transparent, var(--accent3) 20%, var(--accent) 50%, transparent);
  transform: rotate(-15deg);
  transform-origin: top center;
  opacity: 0.4;
}
.hero-slash::after {
  content: '';
  position: absolute;
  top: -10%; left: 40%;
  width: 1px; height: 130%;
  background: linear-gradient(to bottom, transparent, rgba(74,158,255,0.3) 30%, transparent);
  transform: rotate(-15deg);
  transform-origin: top center;
}

/* RIGHT side — photo panel with diagonal clip */
.hero-photo-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 55%;
  z-index: 1;
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0% 100%);
  background: url('bg/car-99-takes-the-lead-in-a-blur-of-speed.jpg') center center / cover no-repeat;
  filter: brightness(0.35) saturate(0.5) hue-rotate(200deg);
}
.hero-photo-panel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(5,8,16,1) 0%, rgba(10,20,60,0.5) 40%, transparent 80%);
}

/* LEFT side — text content */
.hero-content {
  position: relative; z-index: 3;
  padding: 0 2.5rem 0 max(2.5rem, calc((100vw - 1140px)/2 + 2.5rem));
  padding-top: 100px;
}

.hero-eyebrow {
  font-family: var(--font-cond); font-size: 0.78rem; letter-spacing: 0.28em;
  text-transform: uppercase; font-weight: 700; color: var(--accent3);
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.hero-eyebrow::before {
  content: ''; display: block;
  width: 32px; height: 1px; background: var(--accent3);
}

.hero-title {
  color: var(--text);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 80px rgba(74,158,255,0.2);
}
.hero-title em {
  font-style: normal; color: var(--accent);
  display: block;
  text-shadow: 0 0 120px rgba(74,158,255,0.35);
}

.hero-rule {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, var(--accent3), var(--accent));
  margin: 1.5rem 0;
  transform: skewX(-20deg);
}

.hero-desc {
  color: var(--muted); font-size: 1rem; max-width: 42ch;
  font-weight: 300; margin-bottom: 3rem;
  line-height: 1.75;
}

/* Nav cards — angled, left-aligned */
.hero-cards {
  display: flex; gap: 2px; max-width: 520px;
}
.hero-card {
  flex: 1;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.3rem;
  color: var(--text);
  position: relative; overflow: hidden;
  transition: background 0.25s, border-color 0.25s;
  /* Angled left edge on cards */
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
}
.hero-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent3));
  transform: scaleX(0); transform-origin: right; transition: transform 0.3s;
}
.hero-card:hover { background: var(--glass-hover); border-color: rgba(74,158,255,0.3); }
.hero-card:hover::before { transform: scaleX(1); }
.hero-card:hover .card-arrow { color: var(--accent3); }
.hero-card .card-num {
  font-family: var(--font-cond); font-size: 0.62rem; letter-spacing: 0.15em;
  color: var(--accent2); font-weight: 700;
}
.hero-card .card-title { font-family: var(--font-head); font-size: 1.3rem; letter-spacing: 0.05em; }
.hero-card .card-arrow { font-size: 1rem; margin-top: 0.5rem; color: var(--muted); transition: color 0.2s; }

/* LARGE BACKGROUND NUMBER — ghost graphic */
.hero-ghost-num {
  position: absolute; z-index: 2; pointer-events: none;
  right: 5%; bottom: -5%;
  font-family: var(--font-head); font-size: clamp(18rem, 35vw, 38rem);
  line-height: 1; letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(74,158,255,0.06);
  user-select: none;
  transform: skewX(-8deg);
}

/* ── PAGE HEADER (inner pages) ── */
.page-hero {
  padding-top: 130px; padding-bottom: 3.5rem;
  position: relative; overflow: hidden;
}
/* Diagonal accent bar behind title */
.page-hero::before {
  content: '';
  position: absolute; top: 0; left: -5%; right: -5%; bottom: 0;
  background: url('bg/black-white-concrete-background.jpg') center / cover;
  opacity: 0.055;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  filter: hue-rotate(200deg) saturate(0.2);
}
.page-hero::after {
  content: ''; position: absolute; bottom: 0; left: -5%; right: -5%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border) 30%, var(--accent3) 50%, var(--glass-border) 70%, transparent);
  opacity: 0.5;
}
.label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-cond); font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent3); font-weight: 700;
  margin-bottom: 1rem;
  padding: 0.3rem 1rem 0.3rem 0.7rem;
  border: 1px solid rgba(0,212,255,0.25);
  background: rgba(0,212,255,0.06);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%);
}
.label::before { content: ''; display: block; width: 16px; height: 1px; background: var(--accent3); }

/* ── GLASS CARD ── */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background 0.25s, border-color 0.25s;
}
.glass:hover { background: var(--glass-hover); border-color: rgba(74,158,255,0.22); }

/* ── SECTION ── */
.section { padding: 5rem 0; position: relative; }
.section::after {
  content: ''; position: absolute; bottom: 0; left: -5%; right: -5%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border) 50%, transparent);
}
.section-label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-cond); font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent3); font-weight: 700;
  margin-bottom: 0.6rem;
  padding: 0.25rem 0.9rem 0.25rem 0.6rem;
  border: 1px solid rgba(0,212,255,0.2);
  background: rgba(0,212,255,0.05);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 8px 100%);
}
.section-label::before { content: ''; display: block; width: 12px; height: 1px; background: var(--accent3); }

/* ── PORTFOLIO ── */
.portfolio-category { margin-bottom: 5rem; }
.cat-header { margin-bottom: 1.5rem; }
.cat-desc {
  color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; max-width: 55ch;
  border-left: 2px solid var(--accent2); padding-left: 0.9rem;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
  background: rgba(74,158,255,0.06);
  border: 1px solid var(--glass-border);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.portfolio-item {
  background: #0a0e1a; overflow: hidden; position: relative; aspect-ratio: 4/3;
}
.portfolio-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94), filter 0.4s;
  filter: grayscale(30%) brightness(0.8) saturate(0.8);
}
.portfolio-item:hover img { transform: scale(1.06); filter: grayscale(0%) brightness(1) saturate(1.1); }
.portfolio-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(26,111,232,0.55) 0%, transparent 55%),
              linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 55%);
  opacity: 0; transition: opacity 0.3s;
  display: flex; align-items: flex-end; justify-content: space-between; padding: 1rem;
}
.portfolio-item:hover .portfolio-item-overlay { opacity: 1; }
.portfolio-item-overlay span {
  font-family: var(--font-cond); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: #fff; font-weight: 700;
}
.portfolio-item-overlay::after { content: '↗'; color: var(--accent3); font-size: 1rem; }

/* ── VIDEO ── */
.video-block {
  margin-top: 2px; border: 1px solid var(--glass-border); background: #050810;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%); overflow: hidden;
}
.video-block video { display: block; width: 100%; }

/* ── FILE LINKS ── */
.file-link {
  display: inline-flex; align-items: center; gap: 0.75rem;
  background: var(--glass); border: 1px solid var(--glass-border);
  padding: 0.85rem 1.4rem;
  font-family: var(--font-cond); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 700; color: var(--text);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  margin-right: 0.75rem; margin-bottom: 0.75rem;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.file-link::before { content: '↗'; font-size: 0.9rem; color: var(--accent3); }
.file-link:hover { background: var(--glass-hover); border-color: rgba(74,158,255,0.35); color: var(--accent); }

/* ── ABOUT ── */
.about-grid { display: grid; grid-template-columns: 1fr 1.65fr; gap: 4rem; align-items: start; }
.about-photo { position: relative; }
.about-photo::before {
  content: ''; position: absolute; inset: -6px 6px -6px -6px;
  border: 1px solid var(--accent2);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  opacity: 0.3; z-index: 0;
}
.about-photo-inner {
  position: relative; z-index: 1;
  aspect-ratio: 3/4; overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}
.about-photo-inner img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(10%) brightness(0.95); }
.about-text h2 { margin-bottom: 0.4rem; }
.about-tagline {
  font-family: var(--font-cond); font-size: 0.75rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1.5rem; font-weight: 700;
}
.about-text p + p { margin-top: 1rem; }
.skills-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; list-style: none; }
.skills-list li {
  font-family: var(--font-cond); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 700;
  border: 1px solid var(--glass-border); padding: 0.3rem 0.75rem; color: var(--muted);
  background: var(--glass);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}
.skills-list li.highlight { border-color: rgba(74,158,255,0.4); color: var(--accent); background: var(--accent-dim); }

/* ── TIMELINE ── */
.timeline { margin-top: 1.5rem; }
.timeline-item {
  display: grid; grid-template-columns: 150px 1fr; gap: 1.5rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--glass-border); position: relative;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item::before {
  content: ''; position: absolute; left: 145px; top: 1.5rem; bottom: 0;
  width: 1px; background: linear-gradient(to bottom, var(--accent2), transparent); opacity: 0.25;
}
.timeline-date {
  font-family: var(--font-cond); font-size: 0.7rem; letter-spacing: 0.12em;
  color: var(--accent3); text-transform: uppercase; font-weight: 700; padding-top: 0.15rem;
}
.timeline-body h4 { font-family: var(--font-body); font-weight: 500; font-size: 1rem; color: var(--text); }
.timeline-body .org {
  font-family: var(--font-cond); font-size: 0.72rem; letter-spacing: 0.1em;
  color: var(--accent); text-transform: uppercase; margin-top: 0.15rem; display: block; font-weight: 700;
}
.timeline-body p { font-size: 0.88rem; color: var(--muted); margin-top: 0.5rem; max-width: 55ch; }

/* ── CONTACT ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.contact-item {
  padding: 2rem;
  background: var(--glass); border: 1px solid var(--glass-border);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  transition: background 0.2s;
}
.contact-item:hover { background: var(--glass-hover); }
.contact-item h3 { margin-bottom: 0.6rem; }
.contact-item a { font-size: 1.1rem; font-weight: 500; }

/* ── FOOTER ── */
footer { padding: 2.5rem 0; border-top: 1px solid var(--glass-border); position: relative; z-index: 2; }
footer::before {
  content: ''; position: absolute; top: -1px; left: 0; width: 220px; height: 1px;
  background: linear-gradient(90deg, var(--accent2), var(--accent3), transparent);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-family: var(--font-head); font-size: 1.2rem; letter-spacing: 0.1em; }
.footer-logo span { color: var(--accent3); }
.footer-copy {
  font-family: var(--font-cond); font-size: 0.7rem; letter-spacing: 0.12em;
  color: var(--muted); text-transform: uppercase; font-weight: 700;
}

/* ── HOME NAV (used on home page only) ── */
.home-nav-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--glass-border); max-width: 680px; }
.home-nav-card {
  background: var(--glass); padding: 1.5rem 1.8rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  transition: background 0.2s; color: var(--text); position: relative; overflow: hidden;
}
.home-nav-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent3); transform: scaleX(0); transform-origin: left; transition: transform 0.3s;
}
.home-nav-card:hover { background: var(--glass-hover); color: var(--accent); }
.home-nav-card:hover::before { transform: scaleX(1); }
.card-num { font-family: var(--font-cond); font-size: 0.65rem; color: var(--accent2); letter-spacing: 0.15em; font-weight: 700; }
.card-title { font-family: var(--font-head); font-size: 1.5rem; letter-spacing: 0.05em; }
.card-arrow { font-size: 1.2rem; margin-top: auto; opacity: 0.5; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}
.fade-up   { animation: fadeUp  0.7s ease both; }
.fade-up-2 { animation: fadeUp  0.7s 0.12s ease both; }
.fade-up-3 { animation: fadeUp  0.7s 0.24s ease both; }
.fade-up-4 { animation: fadeUp  0.7s 0.36s ease both; }
.fade-left  { animation: fadeLeft 0.7s ease both; }
.fade-left-2 { animation: fadeLeft 0.7s 0.15s ease both; }
.fade-left-3 { animation: fadeLeft 0.7s 0.3s ease both; }
.fade-left-4 { animation: fadeLeft 0.7s 0.45s ease both; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; }
  .hero-photo-panel { display: none; }
  .hero-content { padding: 120px 2rem 4rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 1rem; }
  .nav-links { gap: 1.5rem; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.3rem; }
  .timeline-item::before { display: none; }
}
