/* ═══════════════════════════════════════════
   Nino Vrana Photography
   ═══════════════════════════════════════════ */

/* ── Fonts ── */
@font-face {
  font-family: 'Aeonik';
  src: url('../fonts/Aeonik-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Aeonik';
  src: url('../fonts/Aeonik-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Aeonik';
  src: url('../fonts/Aeonik-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Aeonik';
  src: url('../fonts/Aeonik-Bold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ── */
:root {
  --font: 'Aeonik', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --bg: #f9f7f3;
  --text: #000000;
  --text-secondary: #8c8c8c;
  --border: #e0ddd6;
  --cursor-color: #7fa8b0;
  --image-bg: #edebe6;
  --nav-height: 56px;
  --side-pad: 6vw;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1a1a;
    --text: #e8e6e1;
    --text-secondary: #8c8c8c;
    --border: #2a2a28;
    --cursor-color: #7fa8b0;
    --image-bg: #242422;
    --site-name-color: #8c8c8c;
  }
}
:root[data-theme="dark"] {
  --bg: #1a1a1a;
  --text: #e8e6e1;
  --text-secondary: #8c8c8c;
  --border: #2a2a28;
  --cursor-color: #7fa8b0;
  --image-bg: #242422;
  --site-name-color: #8c8c8c;
}

/* ── Reset & base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
  cursor: none;
}
a {
  color: inherit;
  text-decoration: none;
  cursor: none;
}
button {
  cursor: none;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
}
img {
  max-width: 100%;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

/* ── Custom cursor ── */
.cursor {
  position: fixed;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--cursor-color);
  opacity: 0.6;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0.7;
  transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
}
.cursor.hover {
  width: 10px;
  height: 10px;
  opacity: 0.7;
}

/* ── Page grid ── */
.page-grid {
  display: grid;
  grid-template-columns: minmax(200px, 0.28fr) 1fr;
  grid-template-rows: auto 1fr;
  gap: 0 3vw;
  padding-inline: var(--side-pad);
  height: 100vh;
}

/* ── Header ── */
header {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  position: relative;
  z-index: 10;
}
.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: 1230px;
  height: var(--nav-height);
  z-index: 10;
}
.site-name {
  font-size: 1.4rem;
  color: var(--site-name-color, #333333);
  white-space: nowrap;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.site-name a {
  transition: opacity 0.3s;
}
.site-name a:hover {
  opacity: 0.5;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}
nav a,
nav button {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transition: color 0.3s;
}
nav a:hover,
nav button:hover {
  color: var(--text);
}

/* ── Theme toggle ── */
.theme-toggle {
  display: flex;
  align-items: center;
  padding: 0;
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-secondary);
  stroke-width: 1.5;
  fill: none;
  transition: stroke 0.3s;
}
.theme-toggle:hover svg {
  stroke: var(--text);
}
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon { display: none; }
  :root:not([data-theme="light"]) .icon-sun { display: block; }
}

/* ── Project list ── */
.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-self: center;
  padding-bottom: var(--nav-height);
}
.project-list a {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: #444;
  padding: 0.4em 0;
  transition: color 0.3s ease;
  line-height: 1.4;
}
.project-list a:hover,
.project-list a.active {
  color: var(--text);
  font-weight: 400;
}
:root:root[data-theme="dark"] .project-list a { color: #bbb; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .project-list a { color: #bbb; } }

/* ── Image viewer ── */
.viewer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  align-self: center;
  padding-bottom: var(--nav-height);
}
.viewer-inner {
  width: 100%;
  max-width: 1230px;
}
.image-frame {
  width: 100%;
  aspect-ratio: 3 / 2;
  background: var(--image-bg);
  position: relative;
  overflow: hidden;
  
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 2s ease;
}
.image-frame img.loaded {
  opacity: 1;
}
.image-frame .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.4;
  transition: opacity 0.3s;
}
.image-frame img.loaded ~ .placeholder {
  opacity: 0;
}

/* ── Image caption ── */
.image-caption {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
  text-align: right;
  transition: opacity 0.4s ease;
}


/* ── Project list sections ── */
.list-spacer {
  height: 1.5em;
}
.list-label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  padding: 0.2em 0 0.1em;
}
.list-section-title {
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: #444;
  padding: 0.4em 0;
  line-height: 1.4;
}
:root[data-theme="dark"] .list-section-title { color: #bbb; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .list-section-title { color: #bbb; } }

/* ── News page ── */
.news-body {
  overflow: auto;
  height: auto;
}
.news-body .page-grid {
  height: auto;
  grid-template-rows: auto auto;
}
.news-page {
  grid-column: 1 / -1;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 0 6rem;
}
.news-heading {
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 3rem;
  color: var(--text);
}
.news-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 4rem;
}
.news-right .news-image { order: 2; }
.news-right .news-content { order: 1; }
.news-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.news-date {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.5rem;
}
.news-title {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.news-desc {
  font-size: 0.95rem;
  font-weight: 300;
  color: #888;
  line-height: 1.6;
}
:root[data-theme="dark"] .news-desc { color: #999; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .news-desc { color: #999; } }

@media (max-width: 600px) {
  .news-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .news-right .news-image { order: 1; }
  .news-right .news-content { order: 2; }
  .news-page {
    padding: 1.5rem 0 4rem;
  }
}
