/* ============================================================
   Carl Unger — Portfolio Site
   Global Stylesheet
   ============================================================ */

@import url("https://use.typekit.net/ern8dad.css");

:root {
  --bg: #000;
  --fg: #fff;
  --fg-muted: rgba(255,255,255,0.5);
  --fg-dim: rgba(255,255,255,0.25);
  --font-body: 'polymath-text', 'Futura', Courier, monospace;
  --font-heading: 'polymath-display', 'Helvetica Neue', Arial, sans-serif;
  --nav-height: 56px;
  --max-w: 1200px;
  --pad: clamp(24px, 5vw, 64px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: clamp(24px, 1.75vw, 32px);
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.hero-title, .card-title, .project-title, .resume-role-title {
  font-family: var(--font-heading);
  font-style: normal;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   NAV
   ============================================================ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-logo {
  font-family: var(--font-heading);
  font-style: normal;
  font-size: 18px;
  letter-spacing: 0.04em;
  opacity: 1.0;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 1; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-heading);
  font-style: normal;
  font-size: 18px;
  letter-spacing: 0.04em;
  opacity: 1.0;
  transition: opacity 0.2s;
}
.nav-links a:hover { color: rgba(102, 167, 242, 0.9);}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 80px) var(--pad) 120px;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  display: flex;
  align-items: left;
  gap: clamp(32px, 5vw, 64px);
  margin-bottom: 80px;
  padding-left: 0;
  text-align: left;
}

.hero-text {
  font-family: var(--font-heading);
  flex: 1;
  min-width: 0;
}

.hero-image {
  flex-shrink: 0;
  width: clamp(500px, 26%, 160px);
  aspect-ratio: 4/3;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
}

.hero-title {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1.0;
  margin-bottom: 24px;
  background-color: rgba(255,255,255,0.04);
  font-feature-settings: "ss09" 1, "ss03" 1;
}

.hero-bio {
  font-size: clamp(16px, 1.8vw, 20px);
  letter-spacing: 0.08em;
  line-height: 1.25;
  max-width: 480px;
  color: rgba(255, 255, 255, 1);
  background-color: rgba(255,255,255,0.04);
}

@media (max-width: 600px) {
  .hero { flex-direction: column; }
  .hero-image { width: 100%; }
}

/* ============================================================
   PROJECT GRID
   ============================================================ */

.projects-label {
  font-family: var(--font-heading);
  font-size: 32px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--fg);
  margin-top: 10px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-feature-settings: "ss09" 1, "ss03" 1;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 20px;
  margin: 0 auto; 
}

.project-card {
  display: block;
  position: relative;
  overflow: hidden;
  background: #111;
  text-decoration: none;
}

.card-image {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  transition: 0.8em;;
  opacity: 1.0;
}

.project-card:hover .card-image {
  transition: opacity 0.6s ease-out; 
  opacity: 0.5;
}

.card-info {
  padding: 16px 18px 20px;
  background: rgba(0,0,0,0.6);
}

.card-title {
  font-family: var(--font-heading);
  font-style: normal;
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 6px;
  transition: 0;
  font-feature-settings: "ss09" 1, "ss03" 1;
}

.project-card:hover .card-title {
  opacity: 1;
}

.card-meta {
  font-family: var(--font-body);
  font-style: normal;
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
  transition: 0;
  color: var(--fg);
  transition: 0;
}

.project-card:hover .card-meta {
  opacity: 1;
}
@media (max-width: 700px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   PROJECT DETAIL PAGES
   ============================================================ */

.page-back {
  display: inline-flex;
  align-items: left;
  gap: 8px;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 10px;
  transition: color 0.2s, gap 0.2s;
}
.page-back:hover {
  color: var(--fg);
  gap: 12px;
}
.page-back::before { content: '←'; }

.project-header {
  margin-bottom: 10px;
}

.project-title {
  font-size: clamp(24px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
  font-feature-settings: "ss09" 1, "ss03" 1;
}

.project-meta {
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 40px;
}

.project-roles {
  margin-bottom: 48px;
}

.project-roles h3 {
  font-size: 24px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 18px;
}

.project-roles ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 8px;
}

.project-roles li {
  font-size: 20px;
  color: var(--fg);
}

.project-roles li::after {
  content: ' // ';
  opacity: 1.0;
}

.project-roles li:last-child::after {
  content: '';
}
.project-brief {
  font-size: 20px;
  line-height: 1.5;
  color: rgba(255,255,255,1);
  max-width: 660px;
  margin-bottom: 24px;
}
.project-overview h2 {
  font-size: 20px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg);
  margin-top: 48px;
  margin-bottom: 24px;
}
.project-overview p {
  font-size: 20px;
  line-height: 1.5;
  color: var(--fg);
  max-width: 660px;
  margin-bottom: 24px;
}
.project-overview a {
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.project-overview a:hover {
  text-decoration-color: rgba(255,255,255,0.9);
}

/* ============================================================
   RESUME PAGE
   ============================================================ */

.resume-intro {
  font-size: 24px;
  line-height: 1.5;
  color: rgba(6, 0, 0, 1);
  background-color: #fff;
  max-width: 680px;
  margin-bottom: 72px;
}

.resume-section {
  margin-bottom: 64px;
}

.resume-section-label {
  font-size: 20px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(255, 255, 255, 1);
  font-feature-settings: "ss09" 1, "ss03" 1;
}

.resume-role {
  margin-bottom: 40px;
}

.resume-role-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.resume-role-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.resume-role-dates {
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--fg);
  white-space: nowrap;
}

.resume-role-company {
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--fg);
  margin-bottom: 16px;
  text-transform: none;
}

.resume-role ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resume-role li {
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  padding-left: 20px;
  position: relative;
  line-height: 1;
}

.resume-role li::before {
  content: '—';
  position: absolute;
  left: 0;
  opacity: 0.7;
}

.resume-competencies {
  font-size: 18px;
  line-height: 1;
  color: rgba(255,255,255,0.7);
  max-width: 640px;
}

.resume-skills-grid {
  display: grid;
  grid-template-columns: 3fr 3fr;
  gap: 32px;
}

.resume-skill h4 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.resume-skill p {
  font-size: 18px;
  color: rgba(255,255,255,0.6);
  line-height: 1;
}

.resume-education-entry {
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 8px;
}

.resume-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  border: 4px solid rgba(255,255,255,0.9);
  padding: 14px 24px;
  margin-top: 0px;
  transition: border-color 0.2s, background 0.2s;
}
.resume-download:hover {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.04);
}
.resume-download::after { content: '↓'; }

/* ============================================================
   RESUME PAGE OVERRIDES
   ============================================================ */

.page-resume {
  background: #fff;
  color: #000;
}

/* Nav stays dark so it doesn't disappear against the white page */
.page-resume nav {
  background: rgba(0,0,0,0.95);
  color:#fff
}

/* Override any elements that have explicit white colors set */
.page-resume .resume-section-label,
.page-resume .resume-role-dates,
.page-resume .resume-role-company,
.page-resume .resume-role li,
.page-resume .resume-competencies,
.page-resume .resume-skill p,
.page-resume .resume-skills-grid
.page-resume .resume-skill h4 {
  color: rgba(0,0,0,0.7);
}
.page-resume .resume-education-entry,
.page-resume .resume-intro {
  color: rgba(0,0,0,0.7); /* slightly softened black, easier to read than pure #000 */
}

.page-resume .resume-section-label {
  border-bottom-color: rgba(0,0,0,0.7);
}

.page-resume footer {
  border-top-color: rgba(0,0,0,0.15);
}

.page-resume .footer-name,
.page-resume .footer-links a {
  color: rgba(0,0,0,0.5);
}

.page-resume .resume-download {
  color: #000;
  border-color: rgba(0,0,0,0.7);
}

.page-resume .resume-download:hover {
  border-color: rgba(0,0,0,0.7);
  background: rgba(0,0,0,0.04);
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad) 64px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 40px;
}

.footer-name {
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--fg);
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--fg); }

/* ============================================================
   IMAGE GRID
   ============================================================ */

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 equal columns */
  gap: 20px;                              /* tight gap between images */
  margin: 20px 0;                        /* breathing room above and below */
}

.image-grid img {
  width: 100%;
  aspect-ratio: 1/1;     /* forces uniform height — change to 1/1 for squares */
  object-fit: cover;     /* crops the image to fill the cell without distortion */
  display: block;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.image-grid img:hover {
  opacity: 1;
}

/* 2 columns on medium screens */
@media (max-width: 700px) {
  .image-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 1 column on small screens */
@media (max-width: 480px) {
  .image-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
  .card-header {
    flex-direction: column;
    gap: 4px;
  }
  .card-arrow { display: none; }
  .resume-skills-grid { grid-template-columns: 1fr; }
  .resume-role-header { flex-direction: column; gap: 2px; }
  footer { flex-direction: column; align-items: flex-start; }
}
