/* ===========================================================
   ALI DEVECI — PORTFOLIO
   Design language: engineering blueprint / circuit schematic
   =========================================================== */

:root{
  --bg:        #0E1613;
  --surface:   #16211D;
  --surface-2: #1B2823;
  --line:      #2A3833;
  --text:      #F1EEE4;
  --text-mute: #93A69C;
  --accent:    #E8A33D;   /* copper / solder amber */
  --accent-2:  #4FA1C9;   /* steel blue */
  --accent-soft: rgba(232,163,61,0.12);

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-w: 1100px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }

h1, h2, h3{
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}

img{ max-width: 100%; display: block; }

/* ---------- Background grid ---------- */
.grid-bg{
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

/* ---------- Eyebrow / labels ---------- */
.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

/* ---------- Header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(14, 22, 19, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.logo{
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}
.logo-dot{ color: var(--accent); }

.main-nav{
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.main-nav a{
  color: var(--text-mute);
  transition: color 0.2s ease;
  position: relative;
}
.main-nav a:hover{ color: var(--text); }

.nav-cta{
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: 0.4rem 0.85rem;
  border-radius: 3px;
}
.nav-cta:hover{ background: var(--accent-soft); }

.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span{
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover{ transform: translateY(-2px); }

.btn-primary{
  background: var(--accent);
  color: #17120A;
  font-weight: 600;
}
.btn-primary:hover{ background: #f0b158; }

.btn-ghost{
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent); }

.btn-small{ padding: 0.55rem 1rem; font-size: 0.78rem; }

/* ---------- Layout helpers ---------- */
main{ max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }

.section{ padding: 6.5rem 0; border-bottom: 1px solid var(--line); }
.section:last-of-type{ border-bottom: none; }

.section h2{
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 2rem;
}

/* ---------- Hero ---------- */
.hero{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 5rem 0 5.5rem;
  min-height: 78vh;
}

.hero-role{
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 1rem;
  margin: 0.6rem 0 1.4rem;
}

.hero h1{
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.02;
}

.hero-desc{
  color: var(--text-mute);
  max-width: 46ch;
  margin: 0 0 2rem;
}

.hero-actions{ display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }

.hero-meta{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-mute);
}
.dot-sep{ margin: 0 0.5rem; color: var(--accent); }

/* ---------- Circuit diagram ---------- */
.hero-diagram{ display: flex; justify-content: center; }
.circuit-svg{ width: 100%; max-width: 460px; height: auto; }

.trace{
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
  animation: dash 20s linear infinite;
}
@keyframes dash{ to{ stroke-dashoffset: -240; } }

.node{
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1.5;
  transition: stroke 0.25s ease, fill 0.25s ease;
}
.node-center{
  stroke: var(--accent);
  fill: var(--surface-2);
}

.skill-node{ cursor: default; }
.skill-node:hover .node{
  stroke: var(--accent);
  fill: var(--accent-soft);
}

.node-label{
  font-family: var(--font-mono);
  font-size: 12px;
  fill: var(--text);
  text-anchor: middle;
  letter-spacing: 0.03em;
}
.center-label{ font-size: 15px; font-weight: 600; fill: var(--accent); }
.node-sub{
  font-family: var(--font-mono);
  font-size: 8px;
  fill: var(--text-mute);
  text-anchor: middle;
  letter-spacing: 0.1em;
}

/* ---------- About section ---------- */
.section-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.section-grid h2{ font-size: clamp(1.6rem, 3vw, 2.3rem); }

.section-body p{ color: var(--text-mute); margin: 0 0 1.1rem; }

.fact-strip{
  display: flex;
  gap: 2.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.fact{ display: flex; flex-direction: column; }
.fact-num{
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--accent);
  font-weight: 500;
}
.fact-label{ font-size: 0.78rem; color: var(--text-mute); }

/* ---------- Skills ---------- */
.skills-board{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.2rem 3rem;
}
.skill-group h3{
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  color: var(--text);
}
.skill-index{
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.15rem 0.4rem;
}
.chip-row{ display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chip{
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-mute);
  background: var(--surface);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.chip:hover{ border-color: var(--accent-2); color: var(--text); }

/* ---------- Timeline ---------- */
.timeline{ position: relative; padding-left: 2rem; }
.timeline::before{
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
.timeline-item{ position: relative; padding-bottom: 2.5rem; }
.timeline-item:last-child{ padding-bottom: 0; }
.timeline-marker{
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline-date{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-2);
}
.timeline-content h3{ font-size: 1.15rem; margin: 0.4rem 0 0.3rem; }
.timeline-content p{ color: var(--text-mute); margin: 0; }

/* ---------- Volunteer ---------- */
.volunteer-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 2rem;
}
.volunteer-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.volunteer-head h3{ font-size: 1.15rem; }
.volunteer-date{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-2);
}
.volunteer-card p{ color: var(--text-mute); margin: 0; }

/* ---------- Projects ---------- */
.projects-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.6rem;
}
.projects-head h2{ margin-bottom: 0; }

.projects-status{
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-mute);
  margin: 0.5rem 0 1.8rem;
}

.projects-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.project-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.project-card:hover{ border-color: var(--accent); transform: translateY(-3px); }

.project-name{
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text);
  word-break: break-word;
}
.project-desc{
  color: var(--text-mute);
  font-size: 0.88rem;
  flex-grow: 1;
  margin: 0;
}
.project-meta{
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-mute);
}
.project-lang{ display: flex; align-items: center; gap: 0.4rem; }
.lang-dot{
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2);
  display: inline-block;
}

/* ---------- Contact ---------- */
.section-contact{ text-align: left; }
.contact-lead{ color: var(--text-mute); max-width: 50ch; margin: -1rem 0 2.2rem; }

.contact-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.contact-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.contact-card:not(.contact-static):hover{
  border-color: var(--accent);
  transform: translateY(-3px);
}
.contact-label{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.contact-value{ font-size: 0.95rem; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-mute);
  display: flex;
  gap: 0.6rem;
}
.footer-sep{ color: var(--accent); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .trace{ animation: none; }
  .btn:hover, .project-card:hover, .contact-card:hover{ transform: none; }
}

/* ---------- Focus visibility ---------- */
a:focus-visible, .btn:focus-visible, .nav-toggle:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .hero{ grid-template-columns: 1fr; padding-top: 3rem; }
  .hero-diagram{ order: -1; max-width: 340px; margin: 0 auto 1rem; }
  .section-grid{ grid-template-columns: 1fr; }
  .skills-board{ grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  .main-nav{
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.open{ max-height: 400px; }
  .main-nav a{
    width: 100%;
    padding: 1rem clamp(1.25rem, 4vw, 3rem);
    border-bottom: 1px solid var(--line);
  }
  .nav-cta{ border: none; margin-top: 0.2rem; }
  .nav-toggle{ display: flex; }
  .section{ padding: 4rem 0; }
  .fact-strip{ gap: 1.5rem; }
}