/* Simple portfolio design system */

/* Reset and base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #111111;
  --surface: #1A1A1A;
  --text: #FFFFFF;
  --text-2: #D1CDC7;
  --text-3: #AFA89E;
  --accent: #FF5F1F;
  --accent-light: rgba(255, 95, 31, 0.08);
  --border: rgba(245, 243, 238, 0.11);
  --border-2: rgba(245, 243, 238, 0.22);
  --font-serif: "Cormorant", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --max-w: 960px;
  --r: 5px;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(255, 95, 31, 0.08), transparent 60%),
    radial-gradient(900px 700px at 95% 0%, rgba(245, 243, 238, 0.06), transparent 55%),
    linear-gradient(180deg, #111111 0%, #1A1A1A 100%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  font-family: inherit;
}

section {
  scroll-margin-top: 72px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lightboxable {
  cursor: zoom-in;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 1rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.4rem 0.8rem;
  border-radius: var(--r);
  font-size: 13px;
  z-index: 9999;
}

.skip-link:focus {
  top: 1rem;
}

/* Layout */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 17, 17, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-2);
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: 4px;
}

/* Hero */
#hero {
  padding: 7rem 0 5rem;
  border-bottom: 1px solid var(--border);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4rem;
}

.hero-copy {
  min-width: 0;
}

.hero-portrait {
  margin: 0;
  flex-shrink: 0;
  animation: rise 0.7s ease both;
  animation-delay: 0.2s;
}

.hero-portrait img {
  width: 320px;
  height: 320px;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  display: block;
}

@media (max-width: 680px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-portrait {
    order: -1;
  }

  .hero-portrait img {
    width: 180px;
    height: 180px;
  }
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
  animation: rise 0.6s ease both;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 1.2rem;
  animation: rise 0.6s ease both;
  animation-delay: 0.05s;
}

.hero-name em {
  font-style: italic;
  color: var(--accent);
}

.hero-tagline {
  font-size: 17px;
  color: var(--text-2);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  animation: rise 0.6s ease both;
  animation-delay: 0.1s;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: rise 0.6s ease both;
  animation-delay: 0.15s;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 0.6rem 1.2rem;
  border-radius: var(--r);
  border: 1px solid;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-2);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text);
  text-decoration: none;
}

/* Section headers */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Work grid */
#work {
  padding: 5rem 0 3rem;
}

.work-grid {
  column-width: 280px;
  column-gap: 1.5rem;
}

.project-card {
  color: inherit;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

.project-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 25, 22, 0.06);
  text-decoration: none;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.project-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.thumb-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.03);
}

.project-body {
  padding: 1rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.1rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--text-3);
}

.project-card-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.2;
}

.project-tagline {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.project-footer {
  margin-top: 0.4rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

/* About */
#about {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.about-portrait img {
  border-radius: 12px;
}

.about-bio {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.75;
}

.about-bio p+p {
  margin-top: 1rem;
}

.skills-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
}

.skill-item::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* Contact */
#contact {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.contact-inner {
  max-width: 480px;
}

.contact-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.contact-text {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}

.contact-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.contact-link svg {
  color: var(--text-3);
  flex-shrink: 0;
}

/* Gallery */
#gallery {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-note {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 0.75rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 999;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  position: relative;
  max-width: min(1200px, 92vw);
  max-height: 86vh;
}

.lightbox-img {
  width: 100%;
  height: auto;
  max-height: 86vh;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  background: var(--surface);
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-2);
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  color: var(--text);
  border-color: var(--text);
}

/* Footer */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

.footer-copy a {
  color: var(--text-3);
}

.footer-copy a:hover {
  color: var(--accent);
}

/* Project pages */
.project-hero {
  padding: 6rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.project-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.project-title {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.project-subtitle {
  font-size: 16px;
  color: var(--text-2);
  max-width: 640px;
  line-height: 1.7;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.meta-value {
  font-size: 14px;
  color: var(--text-2);
}

.project-page-body {
  padding: 4rem 0 5rem;
}

.project-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 3rem;
}

.body-text {
  color: var(--text-2);
  margin-bottom: 1.5rem;
}

.project-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.project-list li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--text-2);
}

.project-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.project-gallery img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.project-links {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.project-video {
  border-radius: 8px;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 100%;
  background: var(--surface);
  display: block;
}

.project-docs {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.project-docs a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: var(--r);
}

.project-docs a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.media-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-transform: uppercase;
  margin: 1.25rem 0 0.5rem;
}

.viewer-grid {
  display: grid;
  gap: 0.75rem;
}

.vrml-viewer {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.vrml-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.vrml-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: rgba(242, 239, 232, 0.7);
}

.vrml-note {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 0.4rem;
}

/* Responsive */
@media (max-width: 680px) {
  .nav-links {
    display: none;
  }

  .nav-menu-btn {
    display: block;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    gap: 1rem;
    z-index: 99;
  }

  #hero {
    padding: 4rem 0 3.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

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

  .footer-inner {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}