/* ============================================================================
   Darara Hussein — Minimal Single-Column Portfolio
   Clean Light default + Dark mode toggle
   ============================================================================ */

:root {
  --bg: #ffffff;
  --bg-subtle: #f7f7f8;
  --bg-hover: #f1f1f4;
  --border: #e6e6ea;
  --border-strong: #d4d4da;
  --text: #111113;
  --text-secondary: #52525b;
  --text-muted: #8a8a93;
  --accent: #111113;
  --accent-fg: #ffffff;
  --status-green: #16a34a;
  --status-bg: rgba(22, 163, 74, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0a0a0c;
  --bg-subtle: #131317;
  --bg-hover: #1a1a20;
  --border: #232329;
  --border-strong: #32323b;
  --text: #f4f4f6;
  --text-secondary: #a1a1aa;
  --text-muted: #6e6e78;
  --accent: #f4f4f6;
  --accent-fg: #0a0a0c;
  --status-green: #22c55e;
  --status-bg: rgba(34, 197, 94, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Single-Column Container */
.shell {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) 22px 80px;
}

/* Top Minimal Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(36px, 7vw, 56px);
}

.brand {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topnav a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.topnav a:hover {
  color: var(--text);
}

.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--bg-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text);
}

/* Sections */
.section {
  margin-top: 52px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0;
}

.section-hint {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Intro / Hero */
.intro-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.intro-name {
  font-size: clamp(1.55rem, 3.5vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0;
}

.intro-role {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--status-green);
  box-shadow: 0 0 0 3px var(--status-bg);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.intro-bio {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.intro-bio p {
  margin: 0;
}

.intro-bio strong {
  color: var(--text);
  font-weight: 500;
}

/* Action Buttons Bar */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background-color: var(--bg-subtle);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-pill:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-strong);
}

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

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

.btn-pill.primary:hover {
  opacity: 0.9;
}

.btn-pill .arrow {
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.7;
}

/* Experience List */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.exp-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exp-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exp-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: #ffffff;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.exp-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.exp-company {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.exp-role {
  font-size: 13.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.exp-leader {
  flex: 1;
  border-bottom: 1px dashed var(--border);
  margin: 0 2px;
  min-width: 8px;
}

.exp-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.exp-summary {
  margin: 0;
  padding-left: 32px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Selected Work (Inline Expandable Rows) */
.work-list {
  border-top: 1px solid var(--border);
}

.work-item {
  border-bottom: 1px solid var(--border);
}

.work-trigger {
  width: 100%;
  text-align: left;
  padding: 16px 4px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  transition: opacity 0.15s ease;
}

.work-trigger:hover .work-title {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.work-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.work-title-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.work-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.work-year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.work-summary {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.work-icon {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.work-trigger:hover .work-icon {
  background-color: var(--bg-subtle);
  color: var(--text);
}

.work-panel {
  padding: 0 4px 18px 14px;
  margin-left: 4px;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.work-panel[hidden] {
  display: none;
}

.work-bullets {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.work-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 5px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.work-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.work-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--border-strong);
  transition: text-decoration-color 0.15s ease;
}

.work-link:hover {
  text-decoration-color: var(--text);
}

/* Notes / Writing Section */
.notes-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.notes-list.is-empty {
  border-top: none;
}

.notes-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px dashed var(--border-strong);
  background-color: var(--bg-subtle);
}

.notes-empty-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.notes-empty-text {
  font-size: 13px;
  color: var(--text-muted);
}

.note-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s ease;
}

.note-row:hover .note-title {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.note-title {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}

.note-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Single-Column Note Reader View */
.article-view[hidden],
.home-view[hidden] {
  display: none;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
  transition: color 0.15s ease;
}

.back-btn:hover {
  color: var(--text);
}

.article-title {
  font-size: clamp(1.4rem, 3.2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 10px;
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.article-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--text-secondary);
}

.article-body p {
  margin: 0;
}

/* Footer */
.footer {
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links a,
.footer-links button {
  font-size: 12.5px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--text);
}

.clock-mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .topnav {
    gap: 12px;
  }

  .exp-top {
    flex-wrap: wrap;
    row-gap: 2px;
  }

  .exp-company,
  .exp-role {
    white-space: normal;
  }

  .exp-leader {
    display: none;
  }

  .exp-period {
    width: 100%;
    padding-left: 32px;
  }

  .note-row {
    flex-direction: column;
    gap: 4px;
  }
}
