/* Elyas Popal — epopal.co one-pager */

:root {
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter,
    Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Two-tone surface */
  --bg: #181818ff;
  --bg-elevated: #0c0f14;

  /* Accent is present but restrained */
  --accent: #66c934;
  --accent-soft: rgba(43, 255, 128, 0.14);

  /* Structure */
  --border-subtle: #1e2530;

  /* Typography */
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-soft: #6b7280;
}

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

html {
  height: 100%;
}

body {
  height: 100%;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-stack);
  color: var(--text-main);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.page-shell {
  height: 100vh;
  padding: 32px clamp(16px, 3vw, 52px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 20px;
  align-items: stretch;
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 16px;
  align-items: center;
}

.hero-photo {
  display: flex;
  justify-content: center;
}

.hero-photo-inner {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3 / 4;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.hero-photo-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5, 6, 8, 0) 0%,
    rgba(5, 6, 8, 0) 45%,
    rgba(5, 6, 8, 0.55) 100%
  );
  pointer-events: none;
}

.hero-photo-inner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-main {
  max-width: 46ch;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent);
}

.hero-title {
  margin: 12px 0;
  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1.2;
  font-weight: 700;
}

.info-card.is-active .work-grid {
  flex: 1;
}
.hero-lede {
  margin: 16px 0 16px;
  max-width: 38ch;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

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

.button-primary,
.button-ghost {
  border-radius: 2px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.button-primary {
  background: var(--accent);
  color: #020617;
}

.button-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.button-ghost:hover,
.button-primary:hover,
.button-ghost:focus-visible,
.button-primary:focus-visible {
  outline: none;
  border-color: rgba(102, 201, 52, 0.8);
}

.info-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: visible;
}

.info-panel-header {
  display: block;
  margin-bottom: 12px;
}

.info-panel-label {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.info-toggle-group {
  display: flex;
  gap: 8px;
}

.info-toggle-wrapper {
  position: static;
  z-index: 1;
}

.info-toggle {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-soft);
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.info-toggle.is-active {
  background: rgba(102, 201, 52, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  cursor: pointer;
}

.info-panel-body {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.info-card {
  position: absolute;
  inset: 0;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.info-card.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.section-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-soft);
  margin: 0;
}

.work-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.work-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.work-card-logo-link {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
}

.work-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: space-between;
}

.work-card-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  opacity: 0.85;
}

.work-card .work-title {
  margin-top: 0;
}

.work-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.work-summary {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.contact-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

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

.contact-list a:hover {
  text-decoration: underline;
}

.site-footer {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.theme-toggle {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: none;
  background: #e5e7eb;
  color: #020617;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
}

.light .theme-toggle {
  background: #111827;
  color: #f9fafb;
}

.theme-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-icon-moon {
  opacity: 0;
  transform: scale(0.85);
}

.light .theme-icon-sun {
  opacity: 0;
  transform: scale(0.85);
}

.light .theme-icon-moon {
  opacity: 1;
  transform: scale(1);
}

.light {
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --accent: #66c934;
  --accent-soft: rgba(102, 201, 52, 0.12);
  --border-subtle: #e5e7eb;
  --text-main: #0b0d0f;
  --text-muted: #4b5563;
  --text-soft: #6b7280;
}

@media (max-width: 960px) {
  body {
    overflow: auto;
  }

  .page-shell {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 16px;
    height: auto;
  }

  .panel {
    padding: 24px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .info-toggle-group {
    justify-content: flex-start;
  }

  .info-panel-body {
    position: static;
    overflow: visible;
  }

  .info-card {
    position: static;
    inset: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .info-panel::before {
    display: none;
  }

  /* keep theme toggle pinned in the top-right on mobile as well */
}
