/* ==========================================================================
   SHAZIM M — CLEAN EDITORIAL PORTFOLIO
   Minimal dark canvas, warm orange accent, open typography, zero card clutter.
   ========================================================================== */

:root {
  --bg: #111112;
  --bg-subtle: #18181a;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.22);
  --ink: #f3f3f4;
  --ink-secondary: #c7c7cc;
  --ink-muted: #8e8e96;
  --ink-dim: #63636b;

  --accent: #f26722;
  --accent-hover: #ff7a38;
  --accent-ink: #ffffff;

  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1080px;
  --radius: 8px;
  --header-h: 74px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="paper"] {
  --bg: #f7f5f0;
  --bg-subtle: #eeebe3;
  --border: rgba(17, 17, 18, 0.10);
  --border-strong: rgba(17, 17, 18, 0.24);
  --ink: #151517;
  --ink-secondary: #34343a;
  --ink-muted: #5d5d66;
  --ink-dim: #82828b;

  --accent: #dc5211;
  --accent-hover: #c0440a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
}
.skip-link:focus { top: 16px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(17, 17, 18, 0.90);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-theme="paper"] .site-header {
  background: rgba(247, 245, 240, 0.92);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-mark {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-mark .dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 0.16s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--bg-subtle);
}

.menu-btn { display: none; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
}

.mobile-drawer {
  display: none;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.mobile-drawer.open { display: block; }

.mobile-drawer ul {
  list-style: none;
  margin: 0;
  padding: 12px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-drawer a {
  display: block;
  padding: 10px 4px;
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--ink-secondary);
  border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   BUTTONS & TEXT LINKS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.14s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

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

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--ink);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.84rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.16s var(--ease);
}

.text-link:hover { opacity: 0.8; }

/* ==========================================================================
   HERO — CLEAN STUDIO COMPOSITION
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 56px 0 88px;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 6%;
  left: -6%;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 103, 34, 0.10) 0%, rgba(242, 103, 34, 0) 68%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 48px;
  align-items: center;
}

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-section { padding: 32px 0 60px; }
}

.hero-greeting {
  font-size: 1rem;
  color: var(--ink-muted);
  margin: 0 0 4px 0;
}

.hero-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink-secondary);
  letter-spacing: -0.015em;
  margin: 0 0 10px 0;
}

.hero-title {
  font-size: clamp(2.35rem, 5vw, 3.65rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin: 0 0 18px 0;
}

.hero-desc {
  font-size: 1.04rem;
  color: var(--ink-muted);
  max-width: 48ch;
  margin: 0 0 26px 0;
}

.social-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.social-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-portrait-stage {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.portrait-circle-bg {
  position: relative;
  width: min(420px, 88vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at 48% 36%, #232327 0%, #171719 72%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.portrait-circle-bg img {
  width: 88%;
  height: 96%;
  object-fit: cover;
  object-position: center top;
  mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}

[data-theme="paper"] .portrait-circle-bg {
  background: radial-gradient(circle at 48% 36%, #232327 0%, #141416 74%);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.14);
}

/* ==========================================================================
   SECTIONS — OPEN EDITORIAL FLOW (NO HEAVY CARDS)
   ========================================================================== */
.section {
  padding: 84px 0;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }
}

.section-heading {
  margin-bottom: 40px;
}

.section-kicker {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin: 0 0 10px 0;
}

.section-lead {
  color: var(--ink-muted);
  max-width: 60ch;
  margin: 0;
}

/* ==========================================================================
   ABOUT — BORDERLESS PHOTO GALLERY + NATURAL BIO
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 52px;
  align-items: start;
}

@media (max-width: 880px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.gallery-main-btn {
  display: block;
  width: 100%;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 4.5;
  background: #0d0d0e;
}

.gallery-main-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 0.35s var(--ease);
}

.gallery-main-btn:hover img { transform: scale(1.02); }

.gallery-caption-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0 12px;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.thumb-btn {
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: opacity 0.16s var(--ease), border-color 0.16s var(--ease);
}

.thumb-btn.active,
.thumb-btn:hover { opacity: 1; }

.thumb-btn.active { border-color: var(--accent); }

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.about-copy p {
  color: var(--ink-muted);
  margin: 0 0 18px 0;
}

.about-copy p:first-of-type {
  color: var(--ink-secondary);
  font-size: 1.08rem;
}

.about-details-list {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
}

@media (max-width: 560px) {
  .about-details-list { grid-template-columns: 1fr; }
}

.detail-pair small {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin-bottom: 3px;
}

.detail-pair span,
.detail-pair a {
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.detail-pair a:hover {
  color: var(--accent);
}

/* ==========================================================================
   WORK / PROJECTS — EDITORIAL ROW LIST (NO BOX CLUTTER)
   ========================================================================== */
.projects-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.tab-btn {
  padding: 6px 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.tab-btn:hover { color: var(--ink); }

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.project-list {
  border-top: 1px solid var(--border);
}

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px 8px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.18s var(--ease);
}

.project-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="paper"] .project-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

@media (max-width: 820px) {
  .project-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px 0;
  }
}

.project-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.project-row-title h3 {
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.project-row-subtitle {
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.project-row-desc {
  margin: 0;
  font-size: 0.93rem;
  color: var(--ink-muted);
  max-width: 56ch;
}

.project-row-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-row-stack {
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.project-row-status {
  font-size: 0.8rem;
  color: var(--ink-dim);
}

.experiments-toggle-row {
  margin-top: 28px;
}

.experiments-panel {
  display: none;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.experiments-panel.open { display: block; }

.exp-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr) auto;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .exp-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ==========================================================================
   SKILLS — OPEN 4-COLUMN EDITORIAL LIST
   ========================================================================== */
.skills-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

@media (max-width: 900px) {
  .skills-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .skills-columns { grid-template-columns: 1fr; }
}

.skill-col h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-list li strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.skill-list li span {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-dim);
  line-height: 1.45;
}

/* ==========================================================================
   MECKNOWN & LAB NOTES — OPEN TWO-COLUMN & THREE-COLUMN LISTS
   ========================================================================== */
.mecknown-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}

@media (max-width: 820px) {
  .mecknown-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.mecknown-areas {
  border-top: 1px solid var(--border);
}

.mecknown-area-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.mecknown-area-row strong {
  display: block;
  font-size: 0.96rem;
  margin-bottom: 3px;
}

.mecknown-area-row span {
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.notes-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

@media (max-width: 860px) {
  .notes-list { grid-template-columns: 1fr; gap: 24px; }
}

.note-item {
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-date {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}

.note-item h3 {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.note-item p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin: 0;
  flex: 1;
}

/* ==========================================================================
   CONTACT — CLEAN MINIMAL SPLIT
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 52px;
  align-items: start;
}

@media (max-width: 820px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.contact-links {
  border-top: 1px solid var(--border);
}

.contact-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.16s var(--ease);
}

.contact-link-row:hover {
  color: var(--accent);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}

.field-input,
.field-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.field-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-feedback {
  font-size: 0.85rem;
  color: var(--accent);
  min-height: 20px;
}

/* ==========================================================================
   MODAL & PROJECT DETAIL PAGE
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 8, 10, 0.85);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open { display: flex; }

.modal-dialog {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}

.modal-body { padding: 24px; }

.modal-image {
  max-height: 66vh;
  width: auto;
  margin: 0 auto 14px;
  border-radius: 6px;
}

/* Project Detail */
.detail-hero {
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
  gap: 48px;
  padding: 44px 0 80px;
}

@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.detail-section {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.detail-section:last-of-type {
  border-bottom: 0;
}

.detail-section h2 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0 0 10px 0;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-muted);
}

.detail-list li { margin-bottom: 6px; }

.flow-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.flow-step {
  padding: 6px 12px;
  background: var(--bg-subtle);
  border-radius: 6px;
}

.flow-arrow {
  color: var(--accent);
  font-weight: 700;
}

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
