/* ========================================
   Jeremy Lasman — Personal Site
   Dark, atmospheric, lab-like
   ======================================== */

:root {
  /* Type */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    7rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Colors — dark lab palette */
  --color-bg:          #08080a;
  --color-surface:     #111114;
  --color-surface-2:   #18181c;
  --color-border:      #252528;
  --color-text:        #d4d4d8;
  --color-text-muted:  #71717a;
  --color-text-faint:  #3f3f46;
  --color-accent:      #4f98a3;
  --color-accent-muted: oklch(from #4f98a3 l c h / 0.15);

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Inter', sans-serif;
  --font-body:    'Satoshi', 'Inter', sans-serif;

  /* Layout */
  --content-narrow: 680px;
  --content-default: 1000px;
  --content-wide: 1200px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================
   Layout helpers
   ======================================== */

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container-narrow {
  max-width: var(--content-narrow);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* ========================================
   Scroll reveal animations
   ======================================== */

.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

/* ========================================
   Hero
   ======================================== */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center 60%, transparent 0%, var(--color-bg) 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-6);
  max-width: 900px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: var(--space-6);
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.hero-sub {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.7;
  max-width: 540px;
  margin-inline: auto;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}

.hide-mobile { display: none; }
@media (min-width: 640px) {
  .hide-mobile { display: inline; }
}

.scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--color-text-faint);
  animation: float 2.5s ease-in-out infinite;
}

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

.scroll-dot {
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* ========================================
   Throughline
   ======================================== */

.throughline {
  padding: clamp(var(--space-16), 10vw, var(--space-32)) 0;
}

.throughline-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: start;
}

@media (min-width: 768px) {
  .throughline-layout {
    grid-template-columns: 200px 1fr;
    gap: var(--space-12);
  }
}

.throughline-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-border);
  justify-self: center;
}

@media (min-width: 768px) {
  .throughline-photo {
    width: 200px;
    height: 200px;
    justify-self: start;
    position: sticky;
    top: var(--space-8);
  }
}

.throughline-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.throughline-lead {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: var(--space-6);
  line-height: 1.25;
}

.throughline-body {
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.throughline-body:last-child {
  margin-bottom: 0;
  color: var(--color-accent);
  font-weight: 500;
}

/* ========================================
   Section labels
   ======================================== */

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
}

/* ========================================
   Projects
   ======================================== */

.projects {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) 0;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-4);
  }
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: background 200ms var(--ease-out),
              border-color 200ms var(--ease-out),
              transform 200ms var(--ease-out);
}

.project-card:hover {
  background: var(--color-surface-2);
  border-color: #333;
  transform: translateY(-2px);
}

.project-tag {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  flex: 1;
}

.project-arrow {
  align-self: flex-end;
  color: var(--color-text-faint);
  opacity: 0.5;
  transition: opacity 200ms var(--ease-out);
}

.project-card:hover .project-arrow {
  opacity: 1;
  color: var(--color-accent);
}

/* ========================================
   Image break
   ======================================== */

.image-break {
  width: 100%;
  overflow: hidden;
  max-height: 40vh;
}

.image-break img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

/* ========================================
   Origin
   ======================================== */

.origin {
  padding: clamp(var(--space-16), 10vw, var(--space-32)) 0;
}

.origin-text p {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.75;
  margin-bottom: var(--space-6);
}

.origin-text p:last-child {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

/* ========================================
   Connect
   ======================================== */

.connect {
  padding: clamp(var(--space-12), 8vw, var(--space-20)) 0;
  border-top: 1px solid var(--color-border);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.social-links a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
}

.social-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 200ms var(--ease-out);
}

.social-links a:hover {
  color: var(--color-text);
}

.social-links a:hover::after {
  width: 100%;
}

/* ========================================
   Footer
   ======================================== */

footer {
  padding: var(--space-12) var(--space-6) var(--space-8);
  text-align: center;
}

footer a {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: none;
}

footer a:hover {
  color: var(--color-text-muted);
}
