@font-face {
  font-family: sf-pro;
  src: url(fonts/SF-Pro.ttf);
}

/* ---------- THEME VARIABLES ---------- */

:root {
  --bg: #ffffff;
  --text: #111111;
  --subtext: #222222;
  --heading: #000000;
  --border: #dddddd;
  --link: #000000;
  --link-hover: #555555;
  --nav-active: #1a73e8;
}

html.dark {
  --bg: #0d0d0d;
  --text: #e5e5e5;
  --subtext: #bbbbbb;
  --heading: #ffffff;
  --border: #333333;
  --link: #ffffff;
  --link-hover: #bbbbbb;
  --nav-active: #4d8dff;
}

/* ---------- Base Styles ---------- */

html, body {
  margin: 0;
  padding: 0;
  font-family: sf-pro, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}

.container {
  max-width: 760px;
  margin: 80px auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: sf-pro, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  color: var(--heading);
  margin-top: 0;
}

h1 { font-size: 34px; }
h2 { font-size: 26px; margin-top: 40px; }
h3 { font-size: 20px; margin-top: 32px; }

p { color: var(--subtext); }

a {
  text-decoration: none;
  color: var(--link);
  transition: color .15s ease;
}

a:hover { color: var(--link-hover); }

ul {
  padding-left: 20px;
  margin: 0.5em 0 1.2em;
}

li { margin-bottom: 6px; }

/* ---------- Navbar ---------- */

.navbar {
  display: flex;
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  max-width: 760px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.navbar a {
  font-size: 16px;
  color: var(--link);
}

.navbar a.active {
  color: var(--nav-active);
  font-weight: 600;
}

.navbar a:hover {
  color: var(--link-hover);
}

/* Dark Mode Toggle Button */

.theme-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: color .2s ease;
}

.theme-btn:hover {
  color: var(--link-hover);
}

/* ---------- Experience Page Styling ---------- */

.exp-section {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.exp-entry { max-width: 680px; }

.exp-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--heading);
}

.exp-title span {
  font-weight: 400;
  color: var(--subtext);
}

.exp-date {
  margin-top: 4px;
  margin-bottom: 14px;
  font-size: 15px;
  color: var(--subtext);
}

/* ---------- Projects Page ---------- */

.project-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.project-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.project-thumb {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.project-content {
  flex: 1;
}

.project-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--heading);
}

.project-desc {
  color: var(--subtext);
  font-size: 15px;
  line-height: 1.5;
}

.project-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 60px;
  text-align: right;
}

.project-links a {
  color: var(--nav-active);
  font-size: 14px;
}

/* Mobile for Projects */
@media (max-width: 768px) {
  .project-item {
    flex-direction: column;
    gap: 12px;
  }

  .project-links {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 4px;
  }

  .project-thumb {
    width: 100%;
    height: auto;
    border-radius: 10px;
  }
}

/* ---------- Film Page ---------- */

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.film-grid img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 8px;
}

/* ---------- Mobile Optimizations ---------- */

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .container {
    margin: 40px auto;
    padding: 0 16px;
  }

  .navbar {
    gap: 16px;
    padding-left: 16px;
    padding-right: 16px;
    overflow-x: auto;
    white-space: nowrap;
  }

  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }

  .exp-title {
    font-size: 18px;
  }

  .exp-date {
    font-size: 14px;
  }
}

.film-card {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
}

.film-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  transition: transform .25s ease;
}

.film-card:hover img {
  transform: scale(1.04);
}

.film-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  font-weight: 600;
  font-size: 20px;
  opacity: 0;
  background: rgba(0,0,0,0.35);
  transition: opacity .25s ease;
  pointer-events: none;
}

.film-label span {
  font-size: 14px;
  letter-spacing: 1px;
  font-weight: 300;
}

.film-card:hover .film-label {
  opacity: 1;
}

.gallery-3x4 {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-top: 20px;
}

.gallery-3x4 .image-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 133.33%; /* 3:4 aspect ratio */
  overflow: hidden;
  border-radius: 12px;
}

.gallery-3x4 img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-3x4 img {
  transition: opacity 0.25s ease;
  opacity: 0.92;
}

.gallery-3x4 img:hover {
  opacity: 1;
}

.blog-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: opacity .15s ease;
}

.blog-link:hover {
  opacity: 0.5;
}
