/* Musa Güler — Portfolio
   Direction: cool paper + petroleum teal, precise & quiet */

:root {
  --bg: #e9eef2;
  --bg-deep: #dfe7ee;
  --ink: #14181c;
  --ink-soft: #3d4750;
  --muted: #6b7782;
  --line: rgba(20, 24, 28, 0.12);
  --accent: #0a5c63;
  --accent-hover: #08484e;
  --surface: rgba(255, 255, 255, 0.45);
  --header-h: 4.25rem;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 72rem;
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 100% 0%, #c5d5de 0%, transparent 55%),
    radial-gradient(90% 60% at 0% 40%, #d4e0e6 0%, transparent 50%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

h1,
h2,
h3,
.hero-brand,
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin: 0.35rem 0 1rem;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  margin: 0.25rem 0 0;
  max-width: 22ch;
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  backdrop-filter: blur(14px);
  background: rgba(233, 238, 242, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(233, 238, 242, 0.9);
}

.logo {
  font-size: 1.05rem;
  text-decoration: none;
  font-weight: 700;
}

.logo:hover {
  color: var(--ink);
}

.nav {
  display: none;
  gap: 1.75rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
}

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

.nav-cta {
  color: var(--accent) !important;
  font-weight: 600;
}

.nav-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transform-origin: center;
  transition:
    transform 0.35s var(--ease),
    opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 auto;
  z-index: 49;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem var(--pad) 1.5rem;
  background: rgba(233, 238, 242, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  padding: 0.65rem 0;
}

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

  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }
}

/* Hero — split: copy + portrait (not CV background) */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  padding: calc(var(--header-h) + 1.25rem) var(--pad) 0;
  gap: 1.75rem;
}

.hero-copy {
  max-width: 34rem;
  padding-bottom: 0.5rem;
  animation: rise 0.9s var(--ease) both;
  align-self: end;
}

.hero-brand {
  margin: 0;
  font-size: clamp(2.75rem, 9vw, 5.25rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--ink);
}

.hero h1 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  letter-spacing: 0;
  color: var(--accent);
  margin: 1rem 0 0.85rem;
}

.hero-lead {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
  max-width: 34ch;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.hero-photo {
  margin: 0 calc(var(--pad) * -1) 0;
  background: #050505;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  animation: rise 1s var(--ease) 0.12s both;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  transform: scale(1.02);
  animation: hero-drift 16s var(--ease) infinite alternate;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

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

.btn-primary {
  background: var(--accent);
  color: #f4f8f9;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.95fr);
    gap: 0;
    padding: 0;
    min-height: 100svh;
  }

  .hero-copy {
    align-self: center;
    padding: calc(var(--header-h) + 1rem) clamp(2rem, 6vw, 5rem)
      3rem var(--pad);
    max-width: none;
  }

  .hero-brand {
    font-size: clamp(3.25rem, 6.5vw, 5.75rem);
  }

  .hero-lead {
    max-width: 36ch;
  }

  .hero-photo {
    margin: 0;
    aspect-ratio: auto;
    min-height: 100svh;
    height: 100%;
  }
}

@keyframes hero-drift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.06) translate3d(-1%, -0.8%, 0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}

.section-head {
  margin-bottom: 2.25rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-intro .intro-text {
  margin: 0;
  max-width: 48rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.timeline li {
  display: grid;
  gap: 0.75rem 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 720px) {
  .timeline li {
    grid-template-columns: minmax(10rem, 14rem) 1fr;
  }
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.timeline-meta time {
  font-weight: 600;
  color: var(--ink-soft);
}

.timeline-body .org {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.timeline-body p:last-child {
  margin: 0;
  color: var(--ink-soft);
  max-width: 42rem;
}

/* Skills */
.section-skills {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  background: rgba(255, 255, 255, 0.35);
  border-block: 1px solid var(--line);
}

.section-skills .section-head,
.section-skills .skill-grid {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.skill-grid {
  display: grid;
  gap: 2.5rem 3rem;
}

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

@media (min-width: 960px) {
  .skill-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.skill-grid h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}

.skill-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.skill-grid li {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* Education */
.edu-block {
  display: grid;
  gap: 1.75rem;
  margin-bottom: 3rem;
}

@media (min-width: 720px) {
  .edu-block {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.edu-block article time {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.edu-block article p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.certs h3 {
  margin-bottom: 1rem;
}

.certs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.certs li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  display: grid;
  gap: 0.25rem;
}

@media (min-width: 640px) {
  .certs li {
    grid-template-columns: 12rem 1fr;
    gap: 1.5rem;
    align-items: baseline;
  }
}

.certs li span:first-child,
.certs li > span {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
}

/* Contact */
.section-contact {
  padding-bottom: clamp(4rem, 10vw, 7rem);
}

.contact-lead {
  margin: -0.5rem 0 2.5rem;
  max-width: 36rem;
  color: var(--ink-soft);
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 36rem;
}

.contact-list li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.contact-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.contact-list li > span:first-child {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-list a {
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.contact-list a:hover {
  text-decoration: underline;
}

.contact-social {
  align-items: center;
}

.social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  min-width: 0;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  max-width: 2.5rem;
  max-height: 2.5rem;
  padding: 0;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}

.social-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(10, 92, 99, 0.06);
  text-decoration: none;
}

.social-links svg {
  display: block;
  width: 1.05rem !important;
  height: 1.05rem !important;
  max-width: 1.05rem;
  max-height: 1.05rem;
  flex-shrink: 0;
  fill: currentColor;
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem var(--pad) 2rem;
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer a {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink-soft);
}

.site-footer a:hover {
  color: var(--accent);
}

/* Reveal on scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-photo img,
  .hero-copy,
  [data-reveal] {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
