/* ariff.my portfolio styles */

:root {
  color-scheme: dark;
  --bg: #080a0f;
  --surface: #0e1219;
  --surface-2: #141a23;
  --chrome: #0b0e13;
  --code-bg: #0a0d12;
  --terminal-bg: #080a0e;
  --border: #232b38;
  --text: #e6edf3;
  --muted: #8b98a8;
  --blue: #58a6ff;
  --cyan: #39d0d8;
  --green: #3fb950;
  --purple: #bc8cff;
  --orange: #f2a65a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --grid-line: rgba(255, 255, 255, 0.018);
  --glass: rgba(14, 18, 25, 0.94);
  --body-glow-1: rgba(88, 166, 255, 0.10);
  --body-glow-2: rgba(188, 140, 255, 0.07);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #edf2f7;
  --chrome: #e7edf4;
  --code-bg: #f8fafc;
  --terminal-bg: #e9eff6;
  --border: #ccd5e1;
  --text: #172033;
  --muted: #5e6b7d;
  --blue: #0969da;
  --cyan: #087f8c;
  --green: #1a7f37;
  --purple: #8250df;
  --orange: #bc4c00;
  --shadow: 0 24px 70px rgba(45, 63, 89, 0.16);
  --grid-line: rgba(37, 55, 78, 0.055);
  --glass: rgba(255, 255, 255, 0.92);
  --body-glow-1: rgba(9, 105, 218, 0.10);
  --body-glow-2: rgba(130, 80, 223, 0.07);
}

:root[data-theme="light"] .intro,
:root[data-theme="light"] .contact-box p,
:root[data-theme="light"] .panel p {
  color: #526175;
}

:root[data-theme="light"] .panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.98));
}

:root[data-theme="light"] .line-numbers {
  color: #9aa7b6;
}

:root[data-theme="light"] .key { color: #0550ae; }
:root[data-theme="light"] .string { color: #0a3069; }
:root[data-theme="light"] .value { color: #953800; }
:root[data-theme="light"] .boolean { color: #8250df; }
:root[data-theme="light"] .comment { color: #6e7781; }

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 5%, var(--body-glow-1), transparent 26rem),
    radial-gradient(circle at 5% 45%, var(--body-glow-2), transparent 28rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a {
  color: inherit;
}

.mono,
code,
.eyebrow,
.status,
.section-label,
.terminal-line,
.footer {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 24px auto 54px;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.window-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  color: var(--muted);
  background: var(--chrome);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.window-actions {
  display: flex;
  gap: 8px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot:nth-child(1) { background: #ff5f57; }
.dot:nth-child(2) { background: #febc2e; }
.dot:nth-child(3) { background: #28c840; }

.window-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.window-title::before {
  color: var(--blue);
  content: "<>";
  font-family: Consolas, monospace;
  font-weight: 700;
}

.branch {
  font-family: Consolas, monospace;
}

.window-tools {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: inline-flex;
  min-width: 76px;
  height: 30px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font: 11px Consolas, monospace;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
}

.theme-icon {
  font-size: 13px;
  line-height: 1;
}

.app {
  display: grid;
  grid-template-columns: 54px 1fr;
}

.activity-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-top: 22px;
  color: #6f7c8d;
  background: var(--chrome);
  border-right: 1px solid var(--border);
}

.activity-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: inherit;
  border-left: 2px solid transparent;
  text-decoration: none;
  font-family: Consolas, monospace;
  font-size: 17px;
  transition: color 160ms ease, border-color 160ms ease;
}

.activity-icon:hover,
.activity-icon.active {
  color: var(--text);
  border-left-color: var(--blue);
}

.workspace {
  min-width: 0;
}

.tabs {
  display: flex;
  overflow-x: auto;
  background: var(--chrome);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}

.tab {
  flex: 0 0 auto;
  padding: 11px 18px;
  color: var(--muted);
  border-right: 1px solid var(--border);
  font-family: Consolas, monospace;
  font-size: 12px;
  text-decoration: none;
}

.tab.active {
  color: var(--text);
  background: var(--surface);
  border-top: 2px solid var(--blue);
  padding-top: 9px;
}

.tab .type-html { color: var(--orange); }
.tab .type-css { color: var(--blue); }
.tab .type-js { color: #e3d04a; }

.main {
  padding: clamp(26px, 5vw, 68px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: clamp(30px, 6vw, 74px);
  align-items: center;
  min-height: 550px;
  padding: 34px 0 66px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-size: 13px;
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  content: "";
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--green);
}

h1 {
  margin: 18px 0 20px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h1 span {
  display: block;
  margin-top: 12px;
  color: transparent;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--purple));
  background-clip: text;
  -webkit-background-clip: text;
}

.intro {
  max-width: 660px;
  color: #aab5c3;
  font-size: clamp(16px, 2vw, 18px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
  font-family: Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: #46536a;
  background: #19212d;
}

.button.primary {
  color: #07111e;
  background: var(--blue);
  border-color: var(--blue);
}

.code-card {
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid #263041;
  border-radius: var(--radius);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
  transform: rotate(1deg);
  transition: transform 240ms ease;
}

.code-card:hover {
  transform: rotate(0deg) translateY(-4px);
}

.code-head {
  display: flex;
  justify-content: space-between;
  padding: 11px 14px;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.code-body {
  display: grid;
  grid-template-columns: 40px 1fr;
  padding: 18px 0;
  font: 13px/1.9 Consolas, "Liberation Mono", monospace;
}

.line-numbers {
  padding-right: 12px;
  color: #46515f;
  text-align: right;
  user-select: none;
}

.code-lines {
  overflow-x: auto;
  padding-right: 18px;
  white-space: nowrap;
}

.key { color: #79c0ff; }
.string { color: #a5d6ff; }
.value { color: #ffa657; }
.boolean { color: #bc8cff; }
.comment { color: #687486; }

.terminal-line {
  padding: 12px 16px;
  color: #aab5c3;
  background: var(--terminal-bg);
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.terminal-line .prompt { color: var(--green); }
.terminal-line .command { color: var(--text); }
.terminal-line .cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--text);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.section-label {
  margin-bottom: 9px;
  color: var(--blue);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin-bottom: 28px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.035em;
}

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

.projects {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: linear-gradient(145deg, rgba(20, 26, 35, 0.94), rgba(13, 17, 24, 0.94));
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.panel:hover {
  transform: translateY(-4px);
  border-color: #3a4659;
}

.panel::after {
  position: absolute;
  inset: auto -35px -50px auto;
  width: 120px;
  height: 120px;
  content: "";
  background: var(--blue);
  border-radius: 50%;
  opacity: 0.035;
}

.panel-index {
  margin-bottom: 20px;
  color: #526071;
  font: 12px Consolas, monospace;
}

.panel h3 {
  margin-bottom: 9px;
  font-size: 18px;
}

.panel p {
  color: var(--muted);
  font-size: 14px;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: #b8c2cf;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  font: 13px Consolas, monospace;
}

.tech::before {
  width: 6px;
  height: 6px;
  content: "";
  background: var(--tech-color, var(--blue));
  border-radius: 50%;
  box-shadow: 0 0 8px var(--tech-color, var(--blue));
}

.project-card {
  display: flex;
  min-width: 0;
  min-height: 330px;
  flex-direction: column;
  padding: 19px;
}

.project-card h3 {
  font-size: 16px;
  line-height: 1.4;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.project-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: rgba(88, 166, 255, 0.08);
  border: 1px solid rgba(88, 166, 255, 0.18);
  border-radius: 9px;
}

.project-icon svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

:root[data-theme="light"] .project-icon {
  background: rgba(9, 105, 218, 0.07);
  border-color: rgba(9, 105, 218, 0.16);
}

.status {
  padding: 5px 8px;
  color: var(--green);
  background: rgba(63, 185, 80, 0.08);
  border: 1px solid rgba(63, 185, 80, 0.24);
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
}

.status.building {
  color: var(--orange);
  background: rgba(242, 166, 90, 0.08);
  border-color: rgba(242, 166, 90, 0.24);
}

.status.development {
  color: var(--purple);
  background: rgba(188, 140, 255, 0.08);
  border-color: rgba(188, 140, 255, 0.24);
}

.project-card h3 a {
  text-decoration: none;
}

.project-card h3 a:hover {
  color: var(--blue);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
}

.tag {
  color: #7f8b9a;
  font: 11px Consolas, monospace;
}

.tag::before {
  content: "#";
  color: var(--blue);
}

.contact-box {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  padding: clamp(24px, 5vw, 42px);
  background: linear-gradient(110deg, rgba(88, 166, 255, 0.08), rgba(188, 140, 255, 0.055));
  border: 1px solid #2a3546;
  border-radius: var(--radius);
}

.contact-box h2 {
  margin-bottom: 8px;
  font-size: clamp(25px, 4vw, 37px);
}

.contact-box p {
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  color: #667384;
  background: var(--chrome);
  border-top: 1px solid var(--border);
  font-size: 11px;
}

.footer .ok { color: var(--green); }

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

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .code-card {
    transform: none;
  }

  .services {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    overflow-x: auto;
    padding: 4px 2px 16px;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--border) transparent;
  }

  .projects {
    grid-template-columns: repeat(5, minmax(250px, 1fr));
    overflow-x: auto;
    padding: 4px 2px 16px;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--border) transparent;
  }

  .services .panel,
  .project-card {
    scroll-snap-align: start;
  }
}

@media (max-width: 640px) {
  .shell {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .window-bar {
    grid-template-columns: 1fr auto;
  }

  .window-title {
    display: none;
  }

  .branch {
    display: none;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .activity-bar {
    display: none;
  }

  .main {
    padding: 28px 20px;
  }

  .hero {
    padding-top: 18px;
  }

  .contact-box,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .code-card {
    margin-inline: -6px;
  }
}

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