/* ============================================================
   MUWAHID — PORTFOLIO
   Engineering Logbook Aesthetic
   Dark mode · Amber accent · IBM Plex Mono + Inter
============================================================ */

/* ============================================================
   TOKENS & RESET
============================================================ */

:root {
  /* Color palette */
  --bg:         #0e0e0e;
  --surface:    #161616;
  --surface-hi: #1e1e1e;
  --border:     #272727;
  --border-hi:  #353535;
  --text:       #d4cfca;
  --text-dim:   #9a948e;
  --muted:      #6b6560;
  --accent:     #c8a96e;
  --accent-dim: #9c7f4e;

  /* Typography */
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;
  --text-hero: clamp(2.5rem, 7vw, 4.5rem);

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;

  /* Layout */
  --max-w:     1024px;
  --nav-h:     60px;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Ruled-line texture — the signature element.
   Evokes graph paper, a composition notebook.
   Very subtle so content reads clearly. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(255, 255, 255, 0.022) 27px,
      rgba(255, 255, 255, 0.022) 28px
    );
  pointer-events: none;
  z-index: 0;
}

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

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

ul {
  list-style: none;
}

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

/* Focus visible — accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}


/* ============================================================
   UTILITY
============================================================ */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-6);
  position: relative;
  z-index: 1;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.04em;
}

.label-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.04em;
}

.separator {
  color: var(--border-hi);
  margin-inline: var(--space-3);
}

.break-desktop {
  display: none;
}

@media (min-width: 640px) {
  .break-desktop {
    display: block;
  }
}


/* ============================================================
   NAVIGATION
============================================================ */

.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}

/* Scrolled state — applied via JS */
.nav-header.scrolled {
  background-color: rgba(14, 14, 14, 0.92);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.nav-logo-mark {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-8);
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: 0.04em;
  transition: color 0.2s var(--ease);
}

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

/* Hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 2px;
}

.nav-hamburger span {
  display: block;
  height: 1px;
  background-color: var(--text-dim);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease), background-color 0.2s;
}

.nav-hamburger:hover span {
  background-color: var(--text);
}

/* Open state */
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile menu */
.nav-links.mobile-open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: var(--space-6);
  z-index: 99;
}

.nav-links.mobile-open a {
  font-size: var(--text-sm);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .nav-hamburger {
    display: none;
  }
}


/* ============================================================
   BUTTONS
============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  padding: 0.65rem 1.4rem;
  border-radius: 3px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
  text-transform: lowercase;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--bg);
  font-weight: 500;
}

.btn-primary:hover {
  background-color: #ddbf82;
}

.btn-secondary {
  border: 1px solid var(--border-hi);
  color: var(--text-dim);
}

.btn-secondary:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

.btn-small {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  padding: 0.45rem 0.9rem;
  border-radius: 2px;
  border: 1px solid var(--border-hi);
  color: var(--text-dim);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

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

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

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


/* ============================================================
   SECTIONS
============================================================ */

.section {
  padding-block: var(--space-24);
}

.section-alt {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  margin-bottom: var(--space-12);
}

.section-tab {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.08em;
  position: relative;
  padding-bottom: var(--space-5);
  display: block;
}

.section-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 1px;
  background-color: var(--accent-dim);
  opacity: 0.5;
}


/* ============================================================
   HERO
============================================================ */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  padding-bottom: var(--space-16);
}

.hero-eyebrow {
  margin-bottom: var(--space-6);
}

.hero-name {
  font-family: var(--font-mono);
  font-size: var(--text-hero);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-4);
}

.cursor {
  color: var(--accent);
  animation: blink 1.1s step-start infinite;
  margin-left: 2px;
}

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

.hero-title {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-8);
}

.hero-bio {
  font-size: var(--text-lg);
  color: var(--text-dim);
  max-width: 52ch;
  line-height: 1.7;
  margin-bottom: var(--space-10);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}


/* ============================================================
   ABOUT
============================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}

.about-text p {
  color: var(--text-dim);
  max-width: 60ch;
  line-height: 1.85;
}

.about-text p + p {
  margin-top: var(--space-5);
}

/* Notebook sidebar */
.notebook-block {
  background-color: var(--surface-hi);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-dim);
  padding: var(--space-6);
  border-radius: 2px;
}

.notebook-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  margin-bottom: var(--space-5);
  letter-spacing: 0.05em;
}

.notebook-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.notebook-list li {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-dim);
  padding-left: var(--space-4);
  position: relative;
}

.notebook-list li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--muted);
}

.notebook-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: var(--space-4);
  letter-spacing: 0.02em;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 340px;
    gap: var(--space-16);
    align-items: start;
  }
}


/* ============================================================
   INTERESTS
============================================================ */

.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-4);
}

.interest-card {
  background-color: var(--surface-hi);
  border: 1px solid var(--border);
  padding: var(--space-6);
  border-radius: 2px;
  transition: border-color 0.2s var(--ease);
}

.interest-card:hover {
  border-color: var(--border-hi);
}

.interest-icon {
  font-size: var(--text-xs);
  color: var(--accent);
  margin-bottom: var(--space-4);
  display: block;
  letter-spacing: 0.1em;
}

.interest-card h3 {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--space-3);
  letter-spacing: 0.01em;
}

.interest-card p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.65;
}


/* ============================================================
   SKILLS
============================================================ */

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

.skill-group-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.skill-name {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  color: var(--text);
  display: block;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s var(--ease);
}

.skill-list li:last-child .skill-name {
  border-bottom: none;
}

.skill-name:hover {
  color: var(--accent);
}

@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-12);
  }
}


/* ============================================================
   PROJECTS
============================================================ */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

.project-card {
  background-color: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  transition: border-color 0.25s var(--ease);
}

.project-card:hover {
  border-color: var(--border-hi);
}

/* Screenshot placeholder area */
.project-screenshot {
  height: 180px;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Subtle grid lines in screenshot placeholder */
.project-screenshot::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.4;
}

.screenshot-placeholder {
  text-align: center;
  position: relative;
  z-index: 1;
}

.placeholder-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Project content */
.project-content {
  padding: var(--space-6);
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.project-title {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
}

.project-status {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.status-wip {
  background-color: rgba(200, 169, 110, 0.1);
  color: var(--accent);
  border: 1px solid rgba(200, 169, 110, 0.2);
}

.status-done {
  background-color: rgba(100, 160, 100, 0.08);
  color: #7ab87a;
  border: 1px solid rgba(100, 160, 100, 0.18);
}

.project-desc {
  font-size: var(--text-sm);
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: var(--space-5);
  max-width: 56ch;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  letter-spacing: 0.04em;
}

.project-links {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ============================================================
   EDUCATION
============================================================ */

.edu-block {
  display: flex;
  gap: var(--space-8);
  align-items: flex-start;
}

.edu-timeline-mark {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent);
  margin-top: 8px;
  box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.15);
}

.edu-degree {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--space-2);
  letter-spacing: 0.01em;
}

.edu-school {
  font-size: var(--text-base);
  color: var(--text-dim);
  margin-bottom: var(--space-2);
}

.edu-meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.04em;
}


/* ============================================================
   CURRENT FOCUS
============================================================ */

.focus-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 520px;
}

.focus-item {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-base);
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}

.focus-item:first-child {
  border-top: 1px solid var(--border);
}

.focus-item:hover {
  color: var(--text);
}

.focus-bullet {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  flex-shrink: 0;
  width: 16px;
}


/* ============================================================
   CONTACT
============================================================ */

.contact-intro {
  font-size: var(--text-lg);
  color: var(--text-dim);
  max-width: 48ch;
  line-height: 1.75;
  margin-bottom: var(--space-10);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 500px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s var(--ease);
}

.contact-link:first-child {
  border-top: 1px solid var(--border);
}

.contact-link:hover {
  border-color: var(--border-hi);
}

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

.contact-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.08em;
  width: 52px;
  flex-shrink: 0;
}

.contact-value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}


/* ============================================================
   FOOTER
============================================================ */

.footer {
  padding-block: var(--space-8);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer-note {
  text-align: right;
}


/* ============================================================
   SCROLL REVEAL
============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
