/* ===========================
   PORTFOLIO — style.css
   Version: 1.4
   Last update: 2026-04-07
   =========================== */

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

:root {
  --cream: #F5F3EE;
  --ink: #1C1B18;
  --ink-mid: #5F5E5A;
  --ink-muted: #888780;
  --ink-faint: #B4B2A9;
  --border: #D3D1C7;
  --border-light: #E0DFD8;
  --dark-bg: #1C1B18;
  --dark-border: #2C2C2A;
  --photo-bg: #2C2C2A;
  --accent: #3C3489;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-mono);
  overflow-x: hidden;
}

/* ===========================
   LANGUAGE SWITCHING
   =========================== */

.en-el {
  display: none;
}

body.lang-en .sv-el {
  display: none;
}

body.lang-en .en-el {
  display: revert;
}

/* ===========================
   INTRO OVERLAY
   =========================== */

.intro-overlay {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

.intro-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.intro-overlay.gone {
  display: none;
}

.intro-text {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
  text-align: center;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  padding: 2rem;
}

.intro-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   SITE & SECTIONS
   =========================== */

.site {
  width: 100%;
}

.section {
  display: grid;
  height: 100vh;
  min-height: 500px;
  opacity: 0;
  transition: opacity 1s ease 0.3s;
}

.section.visible {
  opacity: 1;
}

/* ===========================
   001 — HERO
   =========================== */

.s001 {
  grid-template-columns: 1fr 1fr;
}

.photo-col {
  position: relative;
  overflow: hidden;
  background: var(--photo-bg);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.hero-photo.loaded {
  display: block;
}

.geo {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  pointer-events: none;
}

.text-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 2.5rem;
  border-left: 0.5px solid var(--border);
}

.nav-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.site-id {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  text-transform: uppercase;
  line-height: 1.8;
}

.lang-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.lb {
  font-size: 9px;
  letter-spacing: 0.1em;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  padding: 0;
  transition: color 0.2s;
}

.lb.active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lsep {
  color: var(--border);
  font-size: 9px;
}

.hero-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.h-index {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.h-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--ink);
}

.h-title em {
  font-style: italic;
}

.h-sub {
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--ink-mid);
  line-height: 2;
  font-weight: 300;
  max-width: 320px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 0.5px solid var(--border);
  padding: 4px 9px;
  color: var(--ink-muted);
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.scroll-hint {
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scroll-line {
  width: 32px;
  height: 0.5px;
  background: var(--border);
}

.year {
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

/* ===========================
   002 — OM MIG
   =========================== */

.s002 {
  grid-template-columns: 1fr 1fr;
  border-top: 0.5px solid var(--border);
}

.label-col {
  padding: 2.5rem;
  border-right: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.s-index {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.s-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.12;
  color: var(--ink);
}

.s-sub {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.content-col {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.about-body {
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-mid);
  line-height: 2;
  font-weight: 300;
}

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

.skill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 0.5px solid var(--border-light);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.skill-row:first-child {
  border-top: 0.5px solid var(--border-light);
}

.skill-type {
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ===========================
   003 — PROJEKT
   =========================== */

.s003 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  border-top: 0.5px solid var(--border);
}

.work-card {
  padding: 2rem 2.5rem;
  border-right: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.25s;
}

.work-card:hover {
  background: rgba(63, 52, 137, 0.04);
}

.work-card:nth-child(2n) {
  border-right: none;
}

.work-card:nth-child(3),
.work-card:nth-child(4) {
  border-bottom: none;
}

.work-card.add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(224, 223, 216, 0.12) 6px,
    rgba(224, 223, 216, 0.12) 7px
  );
  cursor: default;
}

.w-num {
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.w-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.w-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--ink);
}

.w-desc {
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  line-height: 1.9;
  font-weight: 300;
}

.w-arrow {
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  align-self: flex-end;
  transition: color 0.2s, transform 0.2s;
}

.work-card:hover .w-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ===========================
   004 — KONTAKT
   =========================== */

.s004 {
  grid-template-columns: 1fr 1fr;
  border-top: 0.5px solid var(--border);
  background: var(--dark-bg);
}

.c-left {
  padding: 2.5rem;
  border-right: 0.5px solid var(--dark-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.c-index {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #444441;
  text-transform: uppercase;
}

.c-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.12;
  color: var(--cream);
}

.c-right {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.c-links {
  display: flex;
  flex-direction: column;
}

.c-link {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 0.5px solid var(--dark-border);
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}

.c-link:hover {
  color: var(--cream);
}

.c-foot {
  font-size: 8px;
  letter-spacing: 0.12em;
  color: #444441;
  text-transform: uppercase;
  line-height: 2;
  margin-top: 2.5rem;
}

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

@media (max-width: 768px) {
  .s001, .s002 {
    grid-template-columns: 1fr;
    grid-template-rows: 40vh 1fr;
  }
  .photo-col { min-height: 40vh; }
  .s003 {
    grid-template-columns: 1fr;
    height: auto;
  }
  .s004 { grid-template-columns: 1fr; height: auto; }
  .c-left { border-bottom: 0.5px solid var(--dark-border); }
  .text-col { border-left: none; border-top: 0.5px solid var(--border); }
}