/* ========== Colours & font ========== */
:root {
  --bg: #0A0809;
  --white: #FFFFFF;
  --beige: #EDE3D3;
  --muted: #A99C92;
  --burgundy: #7A1F33;
  --burgundy-light: #B03A55;
  --gold: #E2B13C;
  --line: rgba(237, 227, 211, 0.14);
}

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

body {
  background: var(--bg);
  color: var(--beige);
  font-family: "Manrope", system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ========== Download CV button ========== */
.cv-btn {
  position: absolute;
  top: 4vh;
  right: 56px;
  z-index: 10;
  background: var(--gold);
  color: #140D02;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}
.cv-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(226, 177, 60, 0.35); }

/* ========== Page layout: 3 columns, always one screen tall ========== */
/* Sizes use min(vw, vh) so they scale with both the width and the height of the window */
.hero {
  height: 100vh;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr);
  /* name | what drives me + tabs | pictures */
  column-gap: 4vw;
  align-items: center;
  padding: 0 0 0 5vw;
  overflow: hidden;
}

/* ========== Left: photo + name ========== */
.photo {
  display: block;
  height: min(36vh, 24vw);
  width: auto;
  -webkit-mask: linear-gradient(#000 78%, transparent);
          mask: linear-gradient(#000 78%, transparent);
}

h1 {
  color: var(--white);
  font-weight: 500;
  font-size: min(5vw, 8.6vh);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-top: 2.6vh;
}

.portfolio {
  margin-top: 1.4vh;
  font-size: min(3.2vw, 5.6vh);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  color: var(--burgundy-light);
}

.info {
  margin-top: 2.8vh;
  font-size: min(1.3vw, 2.4vh);
  line-height: 1.6;
  color: #E2D6C8;
}
.info span { color: var(--gold); white-space: nowrap; }

/* ========== Middle: what drives me + tabs ========== */
.side {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 5vh;
}

.label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: min(0.85vw, 1.6vh);
  letter-spacing: 0.3em;
  color: var(--gold);
}
.label span { width: 36px; height: 1px; background: var(--gold); }

.statement {
  font-size: min(2.3vw, 4.2vh);
  line-height: 1.25;
  font-weight: 300;
  margin-top: 1.8vh;
}
.statement em { font-style: normal; font-weight: 600; color: var(--gold); }

.sub {
  font-size: min(1.15vw, 2.2vh);
  line-height: 1.6;
  color: #C9BDB2;
  margin-top: 1.8vh;
}

.tabs { display: flex; flex-direction: column; gap: 1vh; }

.tab {
  display: grid;
  grid-template-columns: 2.6em 1fr 1.2em;
  align-items: center;
  padding: min(1.5vh, 1vw) 1.3vw;
  border-radius: 12px;
  background: rgba(14, 10, 12, 0.65);
  border: 1px solid var(--line);
  transition: border-color 0.25s, transform 0.25s;
}
.tab:hover { transform: translateX(4px); border-color: var(--gold); }

.tab .num { font-size: 0.6em; color: var(--gold); }
.tab, .tab b { font-size: min(1.4vw, 2.6vh); }
.tab b { font-weight: 500; }
.tab .arrow { color: var(--gold); }

/* Alternate tab colours: pale gold, pale burgundy, pale gold ... */
.tab:nth-child(odd)  { background: rgba(226, 177, 60, 0.12); border-color: rgba(226, 177, 60, 0.35); }
.tab:nth-child(even) { background: rgba(176, 58, 85, 0.20);  border-color: rgba(176, 58, 85, 0.50); }
.tab:nth-child(odd):hover  { background: rgba(226, 177, 60, 0.22); border-color: var(--gold); }
.tab:nth-child(even):hover { background: rgba(176, 58, 85, 0.34);  border-color: var(--burgundy-light); }

/* GitHub / LinkedIn / email icons under the details */
.socials { display: flex; gap: 12px; margin-top: 2.6vh; }
.socials a {
  display: grid;
  place-items: center;
  width: min(3.2vw, 5.4vh);
  height: min(3.2vw, 5.4vh);
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  color: var(--beige);
  transition: transform 0.3s ease, color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.socials a:nth-child(odd)  { background: rgba(226, 177, 60, 0.12); border: 1px solid rgba(226, 177, 60, 0.35); }
.socials a:nth-child(even) { background: rgba(176, 58, 85, 0.20);  border: 1px solid rgba(176, 58, 85, 0.50); }
.socials a:hover { transform: translateY(-3px); color: var(--gold); border-color: var(--gold); }
.socials svg { width: 45%; height: 45%; }

/* ========== Right: curve of pictures ========== */
.strip {
  grid-column: 3;
  grid-row: 1;
  position: relative;
  align-self: stretch;
}

.pic {
  position: absolute;
  width: min(38vh, 19vw);
  height: min(38vh, 19vw);
  background-size: cover;
  background-position: center;
  opacity: 0.8;
  -webkit-mask: radial-gradient(closest-side, #000 40%, transparent);
          mask: radial-gradient(closest-side, #000 40%, transparent);
}
.pic-1 { left: 16%; top: -4%; }   /* neuron      */
.pic-2 { left: 36%; top: 19%; }   /* book        */
.pic-3 { left: 18%; top: 43%; }   /* chess board */
.pic-4 { left: 0;   top: 67%; }   /* statue      */

/* ========== Tablets & phones: stack everything ========== */
@media (max-width: 900px) {
  .cv-btn { top: 20px; right: 20px; }
  .tab, .tab b { font-size: 19px; }
  .label { font-size: 11px; }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 40px;
    height: auto;
    overflow: visible;
    padding: 70px 20px 48px;
  }

  .photo { height: 260px; }
  h1 { font-size: 50px; margin-top: 20px; }
  .portfolio { font-size: 34px; margin-top: 10px; }
  .info { font-size: 17px; margin-top: 20px; }
  .socials { margin-top: 20px; }
  .socials a { width: 44px; height: 44px; }

  /* images become a horizontal strip */
  .strip { width: auto; height: auto; margin: 0 -20px; display: flex; justify-content: center; }
  .pic { position: static; width: 34vw; height: 34vw; margin: 0 -5vw; }

  .side { padding-top: 0; gap: 40px; }
  .statement { font-size: 28px; margin-top: 16px; }
  .sub { font-size: 16px; margin-top: 16px; }
  .tabs { gap: 10px; }
  .tab { padding: 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .tab, .cv-btn { transition: none; }
}

/* ========== Smooth page transitions ========== */
/* Pages cross-fade into each other (Chrome, Edge, Safari 18.2+) */
@view-transition { navigation: auto; }

::view-transition-old(root) { animation: page-out 0.35s ease both; }
::view-transition-new(root) { animation: page-in 0.5s ease both; }

/* The photo glides between pages, the CV button stays put */
.photo, .about-photo { view-transition-name: portrait; }
.cv-btn { view-transition-name: cv-button; }
::view-transition-group(portrait) { animation-duration: 0.6s; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes page-out { to   { opacity: 0; } }
@keyframes page-in  { from { opacity: 0; } }

/* Content rises in gently when a page loads */
.rise { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.rise-2 { animation-delay: 0.08s; }
.rise-3 { animation-delay: 0.16s; }
.rise-4 { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Tabs and buttons ease smoothly on hover */
.tab, .chip-btn, .cv-btn { transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .rise { animation: none; }
}
