/* ============================================================
   Huseyin Aydin — Portfolio
   Blueprint-inspired, dark technical aesthetic
   ============================================================ */

:root {
  --bg:        #f6f7f9;   /* warm paper */
  --bg-2:      #eef1f5;
  --panel:     #ffffff;
  --panel-2:   #f1f4f8;
  --line:      #e1e6ee;
  --line-soft: #e9edf3;
  --text:      #15202e;   /* deep navy ink */
  --muted:     #51607a;
  --faint:     #8590a3;
  --accent:    #c8870e;   /* rich gold — engineering / hi-vis */
  --accent-2:  #1f6feb;   /* blueprint blue */
  --ok:        #138a53;
  --radius:    16px;
  --maxw:      1180px;
  --ease:      cubic-bezier(.22,.61,.36,1);
  --shadow:    0 18px 50px rgba(20,30,55,.10);
  --shadow-sm: 0 8px 24px rgba(20,30,55,.06);
}

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

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

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: "Sora", sans-serif; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
strong { color: #fff; font-weight: 600; }

/* ---------- Backgrounds ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(31,111,235,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,111,235,.06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  opacity: 1;
}
.bg-glow {
  position: fixed; top: -20%; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 700px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 30% 40%, rgba(200,135,14,.12), transparent 55%),
    radial-gradient(circle at 70% 30%, rgba(31,111,235,.12), transparent 55%);
  filter: blur(20px);
}

/* ---------- Layout helpers ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 110px 28px 0;
}
.section__head {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: 48px; flex-wrap: wrap;
}
.section__num {
  font-family: "JetBrains Mono", monospace;
  color: var(--accent); font-size: .9rem; font-weight: 500;
}
.section__title { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
.section__link { margin-left: auto; color: var(--accent-2); font-weight: 500; font-size: .95rem; }
.section__link:hover { color: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
}
.brand { display: flex; align-items: center; gap: 12px; font-family: "Sora"; font-weight: 700; }
.brand__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #c8922a);
  color: #0b0e14; font-family: "Sora"; font-weight: 800; font-size: .95rem;
  box-shadow: 0 6px 20px rgba(232,179,57,.25);
}
.brand__name { font-size: 1rem; letter-spacing: -.01em; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { color: var(--muted); font-size: .94rem; font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text) !important;
  background: var(--panel);
}
.nav__cta:hover { border-color: var(--accent); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s, background .25s, border-color .25s;
  border: 1px solid transparent;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), #d9a531);
  color: #0b0e14;
  box-shadow: 0 8px 26px rgba(232,179,57,.28);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(232,179,57,.4); }
.btn--ghost { background: var(--panel); border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent-2); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: 150px 28px 70px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: "JetBrains Mono", monospace; font-size: .82rem;
  color: var(--accent); text-transform: uppercase; letter-spacing: .12em;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); margin-bottom: 26px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.hero__title { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 800; margin-bottom: 24px; }
.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { color: var(--muted); font-size: 1.08rem; max-width: 580px; margin-bottom: 34px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 46px; }
.hero__stats { list-style: none; display: flex; gap: 40px; flex-wrap: wrap; }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-family: "Sora"; font-size: 2.3rem; font-weight: 800; color: #fff; line-height: 1; }
.hero__stats strong::after { content: "+"; color: var(--accent); }
.hero__stats span { color: var(--faint); font-size: .82rem; margin-top: 6px; }

/* terminal card */
.hero__card { display: flex; flex-direction: column; gap: 18px; }
.card-term {
  background: #0e1422; border: 1px solid #1d2738; border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 26px 60px rgba(20,30,55,.22);
}
.card-term__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px; background: #131c2c; border-bottom: 1px solid #1d2738;
}
.card-term__bar span { width: 11px; height: 11px; border-radius: 50%; background: #2c3548; }
.card-term__bar span:nth-child(1){ background:#ff5f57 } .card-term__bar span:nth-child(2){ background:#febc2e } .card-term__bar span:nth-child(3){ background:#28c840 }
.card-term__bar em { margin-left: auto; font-family: "JetBrains Mono", monospace; font-style: normal; font-size: .78rem; color: var(--faint); }
.card-term__body { padding: 20px 18px; font-family: "JetBrains Mono", monospace; font-size: .86rem; line-height: 1.85; color: #9fb0c7; overflow-x: auto; }
.c-key { color: #6db0ff; } .c-str { color: #f0bd55; } .c-ok { color: #5ad19a; }
.hero__badges { display: flex; gap: 9px; flex-wrap: wrap; }
.badge {
  font-family: "JetBrains Mono", monospace; font-size: .73rem;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); background: var(--panel);
}

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; margin-top: 30px; background: var(--bg-2); }
.marquee__track { display: flex; gap: 22px; white-space: nowrap; width: max-content; animation: scroll 38s linear infinite; }
.marquee__track span { font-family: "Sora"; font-weight: 700; font-size: 1rem; color: var(--faint); letter-spacing: .04em; }
.marquee__track span:nth-child(3n+1){ color: var(--text); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about__lead p { color: var(--muted); margin-bottom: 18px; font-size: 1.02rem; }
.about__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; transition: transform .25s var(--ease), border-color .25s;
}
.feat:hover { transform: translateY(-4px); border-color: var(--accent); }
.feat__icon { font-size: 1.6rem; margin-bottom: 12px; }
.feat h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feat p { color: var(--muted); font-size: .9rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 8px; }
.tl {
  display: grid; grid-template-columns: 200px 1fr; gap: 30px;
  position: relative; padding: 0 0 50px 30px;
  border-left: 1px solid var(--line);
}
.tl:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl__dot {
  position: absolute; left: -7px; top: 4px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--faint);
}
.tl__dot--active { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px rgba(232,179,57,.15); }
.tl__meta { display: flex; flex-direction: column; gap: 4px; }
.tl__date { font-family: "JetBrains Mono", monospace; color: var(--accent); font-size: .85rem; }
.tl__loc { color: var(--faint); font-size: .82rem; }
.tl__body h3 { font-size: 1.25rem; margin-bottom: 4px; }
.tl__org { color: var(--accent-2); font-weight: 500; margin-bottom: 14px; font-size: .95rem; }
.tl__body ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.tl__body li { color: var(--muted); padding-left: 20px; position: relative; font-size: .94rem; }
.tl__body li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }
.tl__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.tl__tags span {
  font-family: "JetBrains Mono", monospace; font-size: .72rem;
  padding: 5px 11px; border-radius: 7px; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--muted);
}
.tl__mini { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.tl__mini div { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px; }
.tl__mini b { display: block; font-size: .9rem; }
.tl__mini span { color: var(--faint); font-size: .78rem; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.skills__col h3 { font-size: 1rem; color: var(--accent); margin-bottom: 18px; font-family: "JetBrains Mono", monospace; font-weight: 500; }
.skill { margin-bottom: 16px; }
.skill span { display: flex; justify-content: space-between; font-size: .9rem; color: var(--text); margin-bottom: 7px; }
.skill i {
  display: block; height: 5px; border-radius: 4px; background: var(--panel-2);
  position: relative; overflow: hidden;
}
.skill i::after {
  content: ""; position: absolute; inset: 0; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px; transition: width 1.1s var(--ease);
}
.skill.in[data-level="5"] i::after { width: 100%; }
.skill.in[data-level="4"] i::after { width: 80%; }
.skill.in[data-level="3"] i::after { width: 60%; }
.skill.in[data-level="2"] i::after { width: 40%; }

.creds { margin-top: 56px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.creds h3 { font-size: 1.2rem; margin-bottom: 22px; }
.creds__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 32px; }
.cred { display: flex; flex-direction: column; padding-left: 16px; border-left: 2px solid var(--accent); }
.cred b { font-size: .96rem; }
.cred span { color: var(--muted); font-size: .86rem; }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.proj {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
  position: relative; overflow: hidden;
}
.proj::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.proj:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: var(--shadow); }
.proj:hover::before { transform: scaleX(1); }
.proj--feature { grid-column: span 2; background: linear-gradient(135deg, var(--panel), var(--panel-2)); }
.proj__tag { font-family: "JetBrains Mono", monospace; font-size: .72rem; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.proj h3 { font-size: 1.3rem; margin-bottom: 10px; }
.proj--feature h3 { font-size: 1.7rem; }
.proj p { color: var(--muted); font-size: .93rem; margin-bottom: 18px; }
.proj__stack { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; }
.proj__stack li {
  font-family: "JetBrains Mono", monospace; font-size: .72rem;
  padding: 5px 11px; border-radius: 7px; border: 1px solid var(--line); color: var(--muted);
}

/* ---------- Blog preview ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .25s var(--ease), border-color .25s;
}
.post:hover { transform: translateY(-5px); border-color: var(--accent-2); }
.post__cat { font-family: "JetBrains Mono", monospace; font-size: .72rem; color: var(--accent-2); margin-bottom: 14px; }
.post h3 { font-size: 1.12rem; margin-bottom: 10px; line-height: 1.25; }
.post p { color: var(--muted); font-size: .9rem; flex-grow: 1; margin-bottom: 16px; }
.post__meta { color: var(--faint); font-size: .8rem; font-family: "JetBrains Mono", monospace; }

/* ---------- Contact ---------- */
.section--contact { padding-bottom: 110px; }
.contact {
  text-align: center; max-width: 760px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 24px;
  padding: 60px 40px; position: relative; overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(circle at 50% 0%, rgba(232,179,57,.12), transparent 60%);
}
.contact > * { position: relative; z-index: 1; }
.contact .section__num { display: block; margin-bottom: 16px; }
.contact__title { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 18px; }
.contact__lead { color: var(--muted); margin-bottom: 30px; }
.contact__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.contact__details { list-style: none; display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }
.contact__details li { display: flex; flex-direction: column; color: var(--text); font-size: .92rem; }
.contact__details span { color: var(--faint); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 5px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 30px 28px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.footer__inner p { color: var(--faint); font-size: .88rem; }
.footer__links { margin-left: auto; display: flex; gap: 22px; }
.footer__links a { color: var(--muted); font-size: .88rem; }
.footer__links a:hover { color: var(--accent); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 130px; }
  .about { grid-template-columns: 1fr; gap: 32px; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .projects, .posts { grid-template-columns: 1fr 1fr; }
  .proj--feature { grid-column: span 2; }
}
@media (max-width: 720px) {
  .nav__links {
    position: fixed; top: 70px; right: 16px; left: 16px;
    flex-direction: column; align-items: stretch; gap: 6px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
    padding: 14px; transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: .25s var(--ease);
  }
  .nav__links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 10px 12px; }
  .nav__cta { text-align: center; }
  .nav__toggle { display: flex; }
  .timeline .tl { grid-template-columns: 1fr; gap: 12px; }
  .tl__mini, .creds__grid, .about__cards { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .projects, .posts { grid-template-columns: 1fr; }
  .proj--feature { grid-column: span 1; }
  .hero__stats { gap: 26px; }
  .section { padding-top: 80px; }
}
