/* custom.css - DorsaT Theme */

:root {
  --sidebar-width: 250px;
  --bg: #000000;
  --fg: #ffffff;
  --muted: #eaeaea;
  --dim: #999999;
  --line: #333333;
  --line-soft: #444444;
  --panel: #111111;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  background-color: var(--bg);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

img,
video,
iframe {
  max-width: 100%;
}

/* ===== SIDEBAR - FIXED LEFT PANEL ===== */
aside.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 100;
  background-color: var(--bg);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  flex-shrink: 0;
}

.avatar-container {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: transparent;
  margin-bottom: 2rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-nav {
  flex-grow: 1;
  width: 100%;
  margin-top: 2rem;
}

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav li {
  list-style: none;
  margin-bottom: 1rem;
}

.main-nav a {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--fg);
  display: block;
  padding: 0.5rem 0 0.5rem 0.75rem;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  border-left-color: var(--fg);
  opacity: 1;
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

/* ===== MAIN CONTENT - RIGHT PANEL ===== */
main.main-content {
  position: fixed;
  left: var(--sidebar-width);
  top: 0;
  right: 0;
  width: calc(100% - var(--sidebar-width));
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem clamp(1.5rem, 4vw, 4rem);
  background-color: var(--bg);
}

.global-header {
  max-width: 1100px;
  margin: 0 auto 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.global-header h1 {
  text-transform: uppercase;
  font-weight: 300;
  letter-spacing: 2px;
  margin: 0 0 0.5rem 0;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.sub-profession {
  color: var(--muted);
  font-weight: 300;
  font-size: 0.9rem;
  margin: 0;
}

.content {
  max-width: 1100px;
  margin: 0 auto;
}

/* Typography */
h1 {
  text-transform: uppercase;
  font-weight: 300;
  letter-spacing: 2px;
  margin: 0 0 0.5rem 0;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

h2 {
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  margin-bottom: 1rem;
  margin-top: 0;
}

h3 {
  font-weight: 400;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

p {
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--muted);
}

a {
  color: var(--fg);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

/* ===== HOME PAGE ===== */
.home-hero {
  margin-top: 2rem;
}

.featured-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--panel);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  overflow: hidden;
}

.featured-hero img,
.featured-hero video,
.featured-hero iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}

.hero-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #222;
  color: var(--muted);
}

.hero-placeholder h2 {
  font-size: 2.5rem;
  letter-spacing: 4px;
  margin: 0;
  text-transform: uppercase;
  text-align: center;
}

.home-intro {
  max-width: 750px;
  margin-top: 2rem;
}

.home-intro h2 {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  margin-bottom: 1rem;
  font-weight: 300;
  line-height: 1.4;
}

.home-copy {
  line-height: 1.8;
  color: var(--muted);
  font-size: 1rem;
}

.tagline {
  font-style: italic;
  color: var(--muted);
  font-weight: 300;
  font-size: 1.1rem;
  margin: 1rem 0;
}

/* ===== GALLERY PAGE (puzzle / masonry) ===== */
.gallery-grid {
  column-count: 3;
  column-gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  display: block;
  break-inside: avoid;
  margin-bottom: 1.5rem;
  overflow: hidden;
  position: relative;
  border-radius: 4px;
  background: var(--panel);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-title {
  padding: 0.75rem;
  text-align: center;
  color: var(--fg);
  font-weight: 500;
  font-size: 0.95rem;
}

/* ===== ITEM DETAIL PAGE ===== */
.item-media {
  width: 100%;
  margin-bottom: 2rem;
  border-radius: 4px;
  overflow: hidden;
  background: var(--panel);
}

.item-media img,
.item-media video {
  width: 100%;
  height: auto;
  display: block;
}

.item-title {
  margin-bottom: 0.5rem;
  margin-top: 0;
  font-size: 1.75rem;
}

.item-year {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.item-content {
  line-height: 1.8;
  color: var(--muted);
}

/* ===== CONTACT PAGE ===== */
.contact {
  max-width: 540px;
  margin-top: 1rem;
}

.contact h2 {
  font-weight: 300;
  letter-spacing: 1px;
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.contact-intro {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.social-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

.social-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
  border-color: var(--fg);
  color: var(--fg);
  transform: translateY(-2px);
  opacity: 1;
}

.social-links svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: currentColor;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  color: var(--fg);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #777;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-bottom-color: var(--fg);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.submit-btn {
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0.75rem 2.25rem;
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.submit-btn:hover {
  opacity: 0.8;
}

.email-direct {
  color: var(--muted);
  font-size: 0.95rem;
}

.email-direct a {
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 2px;
}

.email-direct a:hover {
  border-bottom-color: var(--fg);
  opacity: 1;
}

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

/* Wide screens - more gallery columns */
@media (min-width: 1500px) {
  .gallery-grid {
    column-count: 4;
  }
}

/* Tablet / narrow desktop */
@media (min-width: 769px) and (max-width: 1100px) {
  :root {
    --sidebar-width: 200px;
  }

  .gallery-grid {
    column-count: 2;
  }
}

/* Phone */
@media (max-width: 768px) {
  body {
    display: block;
    height: auto;
  }

  aside.sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 1rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--line);
    z-index: 100;
  }

  .avatar-container {
    width: 50px;
    height: 50px;
    margin-bottom: 0;
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: var(--bg);
    margin: 0;
    padding: 0;
    flex-grow: 0;
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .main-nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
  }

  .main-nav li {
    margin-bottom: 0;
    width: 100%;
    text-align: center;
  }

  .main-nav a {
    border-left: none;
    padding: 1rem;
    font-size: 1.6rem;
    font-weight: 300;
  }

  .main-nav a:hover,
  .main-nav a.active {
    border-left: none;
    opacity: 0.6;
  }

  .hamburger-btn {
    display: block;
    order: 2;
    position: relative;
    z-index: 300;
  }

  /* Lock background scroll while the menu is open */
  body.nav-open {
    overflow: hidden;
  }

  main.main-content {
    position: static;
    left: 0;
    width: 100%;
    height: auto;
    padding: 1.5rem 1.25rem;
  }

  .global-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
  }

  .gallery-grid {
    column-count: 1;
  }

  .social-links {
    grid-template-columns: 1fr;
  }

  .featured-hero {
    margin-bottom: 1.5rem;
  }
}

/* Small phones */
@media (max-width: 420px) {
  main.main-content {
    padding: 1.25rem 1rem;
  }
}
