/* ==========================================================================
   SWISS CORE DESIGN SYSTEM - MATT WORTHINGTON PERSONAL SITE
   ========================================================================== */

/* 1. RESET & VARIABLES */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* Enforce strict 90-degree corner rule globally */
}

:root {
  --bg-color: #faf9f5;      /* Warm editorial eggshell/off-white */
  --text-color: #111111;    /* Stark dark charcoal/black */
  --accent-color: #777777;  /* Muted metadata grey */
  --error-color: #a02020;   /* Muted red for errors */
  --success-color: #206020; /* Muted green for success */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;
}

html, body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden; /* Lock body scrolling so the main container handles it with fixed mask */
}

/* 2. THE DYNAMIC STICKY HEADER (THE ANCHOR) */
#site-header {
  position: fixed;
  top: 20px; /* Spacing from top of screen */
  left: 0;
  width: 100%;
  height: 60px; /* h-16 equivalent */
  z-index: 100;
  background-color: transparent;
  pointer-events: none; /* Allows clicks to pass through header space to content */
}

#header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  pointer-events: auto; /* Re-enable clicks for actual header text/links if any */
}

#header-title {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  font-size: 1.75rem; /* text-3xl mobile */
  line-height: 1;
  color: var(--text-color);
  transition: opacity 250ms ease-in-out; /* Hardware-accelerated opacity swap */
  opacity: 1;
  white-space: nowrap;
}

@media (min-width: 768px) {
  #header-inner {
    padding: 0 48px;
  }
  #header-title {
    font-size: 3rem; /* text-5xl equivalent desktop */
  }
}

/* 3. THE COMPOSITIONAL FADE-OUT ZONE (CSS GRADIENT MASK) */
main {
  position: relative;
  width: 100%;
  height: 100vh; /* Viewport height keeps the mask-image stationary relative to the screen */
  overflow-y: scroll; /* Enable scrolling inside the masked main element */
  scroll-behavior: smooth;
  padding-top: 110px; /* Offset the fade mask to give top content a sharp, square edge on load */
  mask-image: linear-gradient(to bottom, transparent 0px, transparent 60px, black 110px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0px, transparent 60px, black 110px);
}

/* 4. GENERAL SECTION LAYOUT & SPACING */
.scroll-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 24px; /* Generous vertical spacing py-24 to py-32 */
}

@media (min-width: 768px) {
  .scroll-section {
    padding: 120px 48px; /* High structural whitespace */
  }
}

/* Section Header Minimal */
.section-heading-minimal {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.25rem; /* mobile */
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 48px;
  color: var(--text-color);
  text-transform: none; /* No forced uppercase */
}

@media (min-width: 768px) {
  .section-heading-minimal {
    font-size: 3.5rem; /* desktop */
    margin-bottom: 64px;
  }
}

/* Images: Raw, sharp, grid-aligned rectangles */
.grid-image,
.grid-video-slot {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border: none;
  filter: grayscale(100%); /* Force monochromatic, high-contrast print style */
  transition: filter 0.3s ease;
}

.grid-image:hover,
.grid-video-slot:hover {
  filter: grayscale(0%); /* Muted interaction highlight */
}

/* 5. HERO SECTION SPECIFICS */
#hero {
  padding-top: 0; /* Align with main padding */
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.meta-label {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-color);
  margin-bottom: 16px;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.25rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-color);
  margin-bottom: 32px;
  max-width: 600px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border: 1px solid var(--text-color);
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
  }
  .hero-headline {
    font-size: 3.5rem;
  }
}

/* 6. EXPERIENCE SECTION TIMELINE & PRACTICE GRID */
.timeline-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-bottom: 80px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.timeline-time {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text-color);
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.timeline-role {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--accent-color);
  margin-bottom: 12px;
}

.timeline-desc {
  max-width: 700px;
  color: #333333;
}

@media (min-width: 768px) {
  .timeline-row {
    grid-template-columns: 200px 1fr;
    gap: 40px;
  }
}

/* Practice Grid */
.practice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.practice-card {
  padding: 24px 0;
  border-top: 1px solid #dddddd;
}

.practice-card h4 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.practice-card p {
  font-size: 0.95rem;
  color: #444444;
  max-width: 450px;
}

@media (min-width: 768px) {
  .practice-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
  }
}

/* 7. ABOUT SECTION SPECIFICS */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.about-text-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-emphasis {
  font-size: 1.35rem;
  line-height: 1.4;
  font-weight: 500;
  color: var(--text-color);
}

.education-block {
  margin-top: 40px;
}

.education-block h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--text-color);
  padding-bottom: 8px;
  letter-spacing: -0.02em;
}

.edu-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.edu-school {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
}

.edu-degree {
  font-size: 0.9rem;
  color: var(--accent-color);
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
  }
  .edu-row {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* 8. CONTACT SECTION SPECIFICS */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.contact-lead {
  font-size: 1.25rem;
  line-height: 1.5;
  margin-bottom: 32px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #dddddd;
  padding-bottom: 12px;
}

.contact-item .label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent-color);
  margin-bottom: 4px;
}

.contact-item .val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
}

/* Form Fields - Raw lines, zero container, sharp corners */
.contact-form-col form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.form-row {
  display: flex;
  flex-direction: column;
}

.form-row label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: var(--text-color);
}

.form-row input,
.form-row textarea {
  background-color: transparent;
  border: none;
  border-bottom: 2px solid var(--text-color);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-color);
  padding: 8px 0;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  border-bottom-color: var(--accent-color);
}

/* Submit Button - Solid black background, sharp corners, hover invert */
#submit-btn {
  background-color: var(--text-color);
  color: var(--bg-color);
  border: 1px solid var(--text-color);
  padding: 16px 32px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  width: 100%;
  transition: all 0.25s ease;
}

#submit-btn:hover {
  background-color: transparent;
  color: var(--text-color);
}

/* Form Status Message */
.status-msg {
  margin-top: 20px;
  padding: 12px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--text-color);
}

.status-msg.success {
  background-color: transparent;
  border-color: var(--success-color);
  color: var(--success-color);
}

.status-msg.error {
  background-color: transparent;
  border-color: var(--error-color);
  color: var(--error-color);
}

.hide {
  display: none;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 80px;
  }
  #submit-btn {
    width: auto;
  }
}

/* ==========================================================================
   MINIMALIST HERO & NARRATIVE LAYOUT
   ========================================================================== */

.intro-block {
  margin-bottom: 60px;
}

.massive-intro-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3rem; /* mobile */
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
}

.massive-sub-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem; /* mobile */
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  color: var(--text-color);
}

.video-container {
  width: 100%;
  margin-top: 40px;
  overflow: hidden;
}

.grid-video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border: none;
}

.interests-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.narrative-col {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.narrative-block h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.narrative-block p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #333333;
}

.media-col {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.media-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.image-meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-color);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .massive-intro-text {
    font-size: 5.5rem; /* Massive Swiss title */
  }
  
  .massive-sub-text {
    font-size: 2.5rem;
  }
  
  .interests-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
  }
}

/* ==========================================================================
   VIDEO OVERLAY HERO & CONCISE TIMELINE STYLING
   ========================================================================== */

#hero {
  position: relative;
  width: 100%;
  max-width: 1400px; /* Aligns with all other sections */
  margin: 0 auto;    /* Center on ultra-wide viewports */
  height: calc(100vh - 110px); /* Fit remaining screen height on load */
  overflow: hidden;
  padding: 0;
}

#hero .video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  margin-top: 0;
}

#hero .video-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45); /* Subtly darkens video to keep white text legible */
  z-index: 2;
}

#hero .grid-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Greeting to top, details to bottom */
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 24px 80px 24px; /* Clear spacing top/bottom */
}

@media (min-width: 768px) {
  .hero-overlay-content {
    padding: 64px 48px 120px 48px;
  }
}

.hello-line {
  margin-top: 20px; /* Positioning Hello text over the sky */
}

.white-text {
  color: #faf9f5 !important; /* Eggshell white for hero overlay text */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); /* Enhances text definition over variable video colors */
}

.hero-sub-block {
  margin-top: auto; /* Push details below the midpoint of the video panel */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Experience Minimal Layout */
.experience-lead {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--text-color);
  max-width: 800px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .experience-lead {
    font-size: 1.75rem;
  }
}

.past-experience-block {
  margin-top: 48px;
  max-width: 850px;
}

.past-heading {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 16px;
}

.past-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid #dddddd;
  font-size: 1.1rem;
  gap: 8px;
}

.past-row:last-child {
  border-bottom: 1px solid #dddddd;
}

.past-role {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text-color);
}

.past-years {
  font-family: var(--font-sans);
  color: var(--accent-color);
  font-weight: 500;
}

@media (min-width: 768px) {
  .past-row {
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }
}

/* ==========================================================================
   UNIVERSITY COUNSEL CHALLENGE CTA
   ========================================================================== */

.counsel-challenge-cta {
  margin-top: 48px;
  max-width: 850px;
}

.cta-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 12px;
}

.cta-link {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
  color: var(--text-color);
  margin-bottom: 10px;
  transition: opacity 0.2s ease;
}

.cta-link:hover {
  opacity: 0.6;
}

.cta-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.cta-arrow {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--accent-color);
  transition: transform 0.2s ease;
  display: inline-block;
}

.cta-link:hover .cta-arrow {
  transform: translateX(5px);
}

.cta-sub {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--accent-color);
  line-height: 1.5;
  max-width: 500px;
}

@media (min-width: 768px) {
  .cta-text {
    font-size: 2rem;
  }
}

/* ==========================================================================
   LINKEDIN LINK & FOOTER STYLING
   ========================================================================== */

.swiss-link {
  color: var(--text-color);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.swiss-link:hover {
  color: var(--accent-color);
}

.linkedin-btn {
  display: inline-block;
  color: var(--text-color);
  transition: opacity 0.25s ease;
  line-height: 0;
  margin-top: 4px;
}

.linkedin-btn:hover {
  opacity: 0.65;
}

#site-footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 24px;
  border-top: 1px solid #dddddd;
  font-size: 0.8rem;
  color: var(--accent-color);
  line-height: 1.5;
}

@media (min-width: 768px) {
  #site-footer {
    padding: 80px 48px;
  }
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.disclaimer {
  max-width: 900px;
}

.copyright {
  font-weight: 600;
}

