/* ============================================================
   THOM BREKKE — PORTFOLIO STYLESHEET
   style.css
   ============================================================
   TABLE OF CONTENTS
   1.  Reset & Variables
   2.  Base
   3.  Utility
   4.  Navigation
   5.  Hero
   6.  Section Label (shared component)
   7.  About
   8.  Experience
   9.  Work / Project Grid
   10. Case Studies
   11. Video Thumbnail
   12. Tools Strip (shared component)
   13. Education
   14. Contact
   15. Footer
   16. Animations & Scroll Reveal
   ============================================================ */


/* ============================================================
   1. RESET & VARIABLES
   To change colours: edit the values in :root below.
   To change fonts: update --f-display, --f-body, --f-mono
   and the Google Fonts <link> in index.html.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colours */
  --ink:     #0f0f0d;   /* near-black — headings, body text */
  --paper:   #f2eedf;   /* manila — page background */
  --cream:   #e8e3ce;   /* slightly darker — alternate section bg */
  --accent:  #4a6741;   /* forest green — labels, bullets, hover */
  --muted:   #6b6a5e;   /* warm grey — secondary text */
  --rule:    #cbc6ae;   /* light tan — borders and rules */

  /* Fonts */
  --f-display: 'Barlow Condensed', sans-serif;  /* headings */
  --f-body:    'Barlow', sans-serif;            /* body copy */
  --f-mono:    'DM Mono', monospace;            /* labels, tags, nav */

  /* Layout */
  --max:    1120px;                          /* max content width */
  --gutter: clamp(1.5rem, 5vw, 4rem);       /* responsive side padding */
}


/* ============================================================
   2. BASE
   ============================================================ */
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 300;
  line-height: 1.7;
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  overflow-x: hidden;
}


/* ============================================================
   3. UTILITY
   ============================================================ */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }


/* ============================================================
   4. NAVIGATION
   ============================================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem var(--gutter);
  background: rgba(242,238,223,0.93);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav-brand {
  font-family: var(--f-display); font-weight: 700; font-size: 1.15rem;
  color: var(--ink); text-decoration: none;
}

.nav-links { display: flex; gap: 2rem; list-style: none; }

.nav-links a {
  font-family: var(--f-mono); font-size: 0.75rem;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }

/* Hamburger button (mobile only) */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); }

/* Mobile nav */
@media (max-width: 680px) {
  .nav-links {
    display: none; flex-direction: column; gap: 1rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 1.5rem var(--gutter);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
}


/* ============================================================
   5. HERO
   ============================================================ */
#home {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 8rem var(--gutter) 6rem;
  position: relative; overflow: hidden;
}

/* Subtle green gradient wash */
#home::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(74,103,65,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(46,74,43,.06) 0%, transparent 50%);
  pointer-events: none;
}

/* Decorative grid lines */
.hero-rule { position: absolute; background: var(--rule); }
.hero-rule.h { width: 100%; height: 1px; }
.hero-rule.h.top    { top: 30%; }
.hero-rule.h.bottom { bottom: 30%; }
.hero-rule.v { width: 1px; height: 100%; }
.hero-rule.v.left  { left: 33%; }
.hero-rule.v.right { right: 33%; }

.hero-inner { position: relative; z-index: 1; max-width: 780px; text-align: center; }

.hero-eyebrow {
  font-family: var(--f-mono); font-size: 0.72rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.5rem;
  opacity: 0; animation: fadeUp .6s ease forwards .2s;
}

.hero-name {
  font-family: var(--f-display); font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 800; line-height: 0.95; letter-spacing: -0.01em;
  color: var(--ink); margin-bottom: 1.75rem;
  opacity: 0; animation: fadeUp .7s ease forwards .35s;
}
.hero-name em { font-style: normal; color: var(--accent); }

.hero-tagline {
  font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--muted);
  max-width: 580px; margin: 0 auto 2.5rem; line-height: 1.65;
  opacity: 0; animation: fadeUp .7s ease forwards .5s;
}

.hero-cta {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--f-mono); font-size: 0.78rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; background: var(--ink);
  padding: .85rem 2rem; text-decoration: none;
  transition: background .2s, transform .15s;
  opacity: 0; animation: fadeUp .6s ease forwards .65s;
}
.hero-cta:hover { background: var(--accent); transform: translateY(-2px); }


/* ============================================================
   6. SECTION LABEL (shared component)
   The small uppercase label with a rule line used in every section.
   ============================================================ */
.section-label {
  font-family: var(--f-mono); font-size: 0.7rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 2rem;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: var(--accent); opacity: .3;
}


/* ============================================================
   7. ABOUT
   ============================================================ */
#about {
  background: var(--cream);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 7rem var(--gutter);
}

.about-grid {
  display: grid; grid-template-columns: 1fr 1.6fr;
  gap: 5rem; align-items: start;
}
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; gap: 3rem; } }

.about-meta { position: sticky; top: 6rem; }

.about-name-large {
  font-family: var(--f-display); font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700; line-height: 1.15; margin-bottom: 2rem;
}

.about-contact a,
.about-contact span {
  display: block; font-family: var(--f-mono); font-size: 0.78rem;
  color: var(--muted); text-decoration: none; line-height: 2.2;
  transition: color .2s;
}
.about-contact a:hover { color: var(--accent); }

.about-body p { font-size: 1.02rem; line-height: 1.8; margin-bottom: 1.4rem; }

/* Skills pill grid */
.skills-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .5rem .75rem; margin-top: 2.5rem;
}
@media (max-width: 480px) { .skills-grid { grid-template-columns: 1fr; } }

.skill-tag {
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.06em;
  color: var(--muted); padding: .5rem .75rem;
  border: 1px solid var(--rule); background: var(--paper);
}


/* ============================================================
   8. EXPERIENCE
   ============================================================ */
#experience { padding: 7rem var(--gutter); background: var(--paper); }

.exp-header { display: flex; align-items: baseline; gap: 2rem; margin-bottom: 5rem; }

.exp-header h2 {
  font-family: var(--f-display); font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800; line-height: 1;
}

.exp-list { display: flex; flex-direction: column; }

.exp-item {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 3rem; padding: 3rem 0; border-top: 1px solid var(--rule);
}
.exp-item:last-child { border-bottom: 1px solid var(--rule); }

@media (max-width: 768px) { .exp-item { grid-template-columns: 1fr; gap: 1rem; } }

.exp-company {
  font-family: var(--f-display); font-weight: 700;
  font-size: 1.25rem; line-height: 1.2; margin-bottom: .4rem;
}
.exp-dates { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: .08em; color: var(--muted); }
.exp-role {
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent); margin-top: .5rem;
}
.exp-title {
  font-family: var(--f-display); font-size: 1.25rem; font-weight: 700;
  margin-bottom: 1rem; line-height: 1.25;
}
.exp-description { font-size: .95rem; color: #3a3630; margin-bottom: 1.25rem; line-height: 1.75; }

.exp-bullets { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.exp-bullets li {
  font-size: .9rem; color: var(--muted); line-height: 1.65;
  padding-left: 1.25rem; position: relative;
}
.exp-bullets li::before { content: '\2014'; position: absolute; left: 0; color: var(--accent); font-size: .8rem; }


/* ============================================================
   9. WORK / PROJECT GRID
   ============================================================ */
#work { background: var(--ink); color: var(--paper); padding: 7rem var(--gutter); }
#work .section-label { color: var(--accent); }
#work .section-label::after { background: var(--accent); }

#work h2 {
  font-family: var(--f-display); font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800; line-height: 1; margin-bottom: 4rem; color: var(--paper);
}

.work-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: rgba(255,255,255,.07);
}
@media (max-width: 620px) { .work-grid { grid-template-columns: 1fr; } }

.work-card {
  background: var(--ink); padding: 2.5rem;
  text-decoration: none; display: block;
  border: 1px solid transparent; transition: background .25s;
}
.work-card:hover { background: #1a1a16; border-color: rgba(74,103,65,.3); }

.work-card-num {
  font-family: var(--f-mono); font-size: 0.65rem;
  color: rgba(74,103,65,.75); letter-spacing: .1em; margin-bottom: 1.5rem;
}
.work-card-title {
  font-family: var(--f-display); font-size: 1.35rem; font-weight: 700;
  color: var(--paper); line-height: 1.2; margin-bottom: .85rem;
}
.work-card-desc { font-size: .88rem; color: rgba(242,238,223,.5); line-height: 1.7; }

.work-card-arrow {
  margin-top: 1.5rem; font-family: var(--f-mono); font-size: .72rem;
  color: var(--accent); letter-spacing: .08em; text-transform: uppercase;
  opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s;
}
.work-card:hover .work-card-arrow { opacity: 1; transform: translateX(0); }


/* ============================================================
   10. CASE STUDIES
   ============================================================ */
.case-section { padding: 7rem var(--gutter); border-top: 1px solid var(--rule); }
.case-section.alt { background: var(--cream); }
.case-section.dark {
  background: var(--ink); color: var(--paper);
  border-color: rgba(255,255,255,.07);
}

.case-heading {
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 4rem; margin-bottom: 4rem;
}
@media (max-width: 768px) { .case-heading { grid-template-columns: 1fr; gap: 1.5rem; } }

.case-title {
  font-family: var(--f-display); font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700; line-height: 1.15;
}
.case-section.dark .case-title { color: var(--paper); }

.case-body { max-width: 720px; }
.case-body p { font-size: 1rem; line-height: 1.8; margin-bottom: 1.4rem; }
.case-section.dark .case-body p { color: rgba(242,238,223,.78); }

.case-highlight {
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  background: rgba(74,103,65,.06);
  margin: 2rem 0;
}
.case-section.dark .case-highlight { background: rgba(74,103,65,.14); }
.case-highlight p {
  font-family: var(--f-display); font-style: italic;
  font-size: 1.08rem; line-height: 1.6; margin: 0 !important;
}
.case-section.dark .case-highlight p { color: var(--paper); }

.case-list { list-style: none; display: flex; flex-direction: column; gap: .65rem; margin: 1.5rem 0; }
.case-list li { padding-left: 1.5rem; position: relative; font-size: .97rem; line-height: 1.7; }
.case-list li::before { content: '\2192'; position: absolute; left: 0; color: var(--accent); }
.case-section.dark .case-list li { color: rgba(242,238,223,.75); }

.case-back {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--f-mono); font-size: .73rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  margin-top: 2.5rem; transition: color .2s;
}
.case-back:hover { color: var(--accent); }
.case-section.dark .case-back { color: rgba(242,238,223,.35); }
.case-section.dark .case-back:hover { color: var(--accent); }


/* ============================================================
   11. VIDEO THUMBNAIL
   ============================================================ */
.video-thumb {
  display: block; position: relative; margin: 2.5rem 0;
  aspect-ratio: 16/9; overflow: hidden;
  text-decoration: none; background: #111;
}
.video-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform .4s ease;
}
.video-thumb:hover img { transform: scale(1.03); }

.video-play {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .75rem;
  background: rgba(0,0,0,.35); transition: background .25s;
}
.video-thumb:hover .video-play { background: rgba(0,0,0,.5); }
.video-play span {
  font-family: var(--f-mono); font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase; color: #fff;
}


/* ============================================================
   12. TOOLS STRIP (shared component)
   Used inside case study sections to list tools used.
   ============================================================ */
.tools-strip { margin-top: 2rem; }
.tools-strip + .tools-strip { margin-top: 1.25rem; }

.tools-strip-label {
  font-family: var(--f-mono); font-size: .65rem;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .75rem;
}

.tools-wrap { display: flex; flex-wrap: wrap; gap: .4rem; }

.tool-chip {
  font-family: var(--f-mono); font-size: .68rem;
  color: var(--muted); padding: .3rem .65rem;
  border: 1px solid var(--rule); background: var(--paper);
}
.case-section.dark .tool-chip {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.1);
  color: rgba(242,238,223,.5);
}


/* ============================================================
   13. EDUCATION
   ============================================================ */
#education {
  padding: 5rem var(--gutter);
  background: var(--cream);
  border-top: 1px solid var(--rule);
}

.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 3rem; }
@media (max-width: 620px) { .edu-grid { grid-template-columns: 1fr; } }

.edu-card { padding: 2rem; border: 1px solid var(--rule); background: var(--paper); }
.edu-degree { font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; margin-bottom: .35rem; }
.edu-school { font-size: .9rem; color: var(--muted); margin-bottom: .25rem; }
.edu-year { font-family: var(--f-mono); font-size: .7rem; color: var(--accent); letter-spacing: .08em; }


/* ============================================================
   14. CONTACT
   ============================================================ */
#contact { padding: 7rem var(--gutter); background: var(--paper); border-top: 1px solid var(--rule); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; gap: 3rem; } }

.contact-heading {
  font-family: var(--f-display); font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800; line-height: .95; letter-spacing: -.01em;
}
.contact-heading em { font-style: normal; color: var(--accent); }

.contact-links { display: flex; flex-direction: column; gap: 1rem; margin-top: .5rem; }

.contact-link {
  display: flex; align-items: center; gap: 1rem;
  font-size: .95rem; color: var(--ink); text-decoration: none;
  padding: 1rem 1.25rem; border: 1px solid var(--rule);
  transition: border-color .2s, background .2s;
}
.contact-link:hover { border-color: var(--accent); background: rgba(74,103,65,.04); }

.contact-link-label {
  font-family: var(--f-mono); font-size: .65rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  display: block; margin-bottom: .1rem;
}
.contact-link-value { font-weight: 500; }

.contact-icon {
  width: 34px; height: 34px; background: var(--cream); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--accent);
}


/* ============================================================
   15. FOOTER
   ============================================================ */
footer {
  padding: 2rem var(--gutter); border-top: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.footer-brand { font-family: var(--f-display); font-weight: 700; font-size: .95rem; }
.footer-copy { font-family: var(--f-mono); font-size: .65rem; color: var(--muted); letter-spacing: .06em; }


/* ============================================================
   16. ANIMATIONS & SCROLL REVEAL
   .reveal elements start invisible and fade up when scrolled
   into view. The JS in main.js handles adding .visible.
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
