/* ================================================
   IKHD — split-screen portfolio
   ================================================ */

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

:root {
  --bg: #0c0c0c;
  --surface: #161616;
  --border: #222;
  --fg: #e5e5e5;
  --fg2: #888;
  --fg3: #555;
  --accent: #5b8def;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

/* ================================================
   SKIP LINK
   ================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border-radius: 0 0 6px 6px;
  z-index: 10000;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ================================================
   SPLIT LAYOUT
   ================================================ */
.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 100vh;
}

/* LEFT PANEL — sticky sidebar */
.panel-left {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border);
  background: var(--bg);
}

.logo-text {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.logo-text span { color: var(--accent); }

.panel-role {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg2);
  margin-top: 8px;
  letter-spacing: 0.5px;
}

.panel-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 48px;
}
.panel-nav a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg3);
  padding: 6px 0;
  transition: color 0.2s, padding-left 0.2s;
  display: block;
  position: relative;
}
.panel-nav a:hover { color: var(--fg); padding-left: 8px; }
.panel-nav a.active { color: var(--accent); }

.panel-links {
  display: flex;
  gap: 16px;
}
.panel-links a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg3);
  transition: color 0.2s;
}
.panel-links a:hover { color: var(--fg); }

/* RIGHT PANEL — scrollable */
.panel-right {
  padding: 80px 56px 60px;
}

.section {
  margin-bottom: 100px;
}

/* Give contact enough height so it doesn't overlap about */
#contact {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--fg3);
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* HERO */
.hero-text {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -1px;
  max-width: 560px;
}
.hero-text em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
.hero-sub {
  font-size: 16px;
  color: var(--fg2);
  margin-top: 20px;
  max-width: 440px;
  line-height: 1.7;
}

/* PROJECTS — list rows */
.live-site-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 36px;
}
.live-site-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: padding-left 0.2s;
}
.live-site-row:first-child { border-top: 1px solid var(--border); }
.live-site-row:hover { padding-left: 12px; }
.live-site-title {
  font-size: 18px;
  font-weight: 500;
}
.live-site-desc {
  font-size: 13px;
  color: var(--fg2);
  margin-top: 4px;
  line-height: 1.5;
}
.live-site-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  white-space: nowrap;
  text-align: right;
}

.project-list {
  display: flex;
  flex-direction: column;
}
.project-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: padding-left 0.2s;
}
.project-row:first-child { border-top: 1px solid var(--border); }
.project-row:hover { padding-left: 12px; }

.project-row-title {
  font-size: 18px;
  font-weight: 500;
}
.project-row-desc {
  font-size: 13px;
  color: var(--fg2);
  margin-top: 4px;
  line-height: 1.5;
}
.project-row-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg3);
  white-space: nowrap;
  text-align: right;
}
.project-row-meta .lang {
  color: var(--accent);
  margin-right: 12px;
}

/* ABOUT */
.about-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--fg2);
  max-width: 520px;
}
.about-text + .about-text { margin-top: 16px; }

.about-table {
  margin-top: 32px;
  width: 100%;
  max-width: 420px;
  border-collapse: collapse;
}
.about-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.about-table td:first-child {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--fg3);
  width: 130px;
}
.about-table td:last-child { color: var(--fg2); }

/* CONTACT */
.contact-list {
  max-width: 400px;
}
.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.2s;
}
.contact-link:first-child { border-top: 1px solid var(--border); }
.contact-link:hover { padding-left: 8px; }
.contact-link-name { font-weight: 500; font-size: 15px; }
.contact-link-url {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg3);
}
.contact-link-arrow {
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}
.contact-link:hover .contact-link-arrow { opacity: 1; }

/* LOADING */
.loading {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg3);
  padding: 24px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.loading-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 1s step-end infinite;
}
.text-link {
  color: var(--accent);
}
.empty-state {
  color: var(--fg3);
  font-size: 13px;
  padding: 24px 0;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

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

/* RESPONSIVE */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .panel-left {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 24px 20px;
  }
  .panel-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 16px;
  }
  .panel-right { padding: 40px 20px 60px; }
  .live-site-row { grid-template-columns: 1fr; gap: 8px; }
  .live-site-meta { text-align: left; }
  .project-row { grid-template-columns: 1fr; gap: 8px; }
  .project-row-meta { text-align: left; }
}
