/* ================================
   İTÜ LABORATUVAR SİTESİ
   Daha canlı soft mavi tema
   ================================ */

:root {
  --bg: #edf7ff;
  --surface: #ffffff;
  --surface-soft: #dff0fb;
  --surface-blue: #cfe8f7;
  --surface-blue-strong: #b9def2;
  --primary: #2f8fc3;
  --primary-hover: #2479a8;
  --primary-dark: #155b83;
  --text: #173242;
  --muted: #587080;
  --border: #bfdceb;
  --shadow: 0 18px 50px rgba(30, 100, 145, 0.13);
  --radius: 18px;
  --max-width: 1120px;
  --header-offset: 122px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

a {
  color: inherit;
}

section[id] {
  scroll-margin-top: 0;
}

.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  max-width: 820px;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 251, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: 0 5px 20px rgba(21, 91, 131, 0.06);
}

.header-inner {
  width: calc(100% - 40px);
  max-width: 1800px;
  min-height: 142px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 620px;
  min-width: 620px;
}

.brand-logo {
  width: 220px;
  height: 118px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}

.brand-text {
  min-width: 0;
}

.brand h1 {
  margin: 4px 0 2px;
  max-width: 560px;
  font-size: clamp(1.08rem, 1.5vw, 1.34rem);
  line-height: 1.22;
  letter-spacing: 0.012em;
}

.eyebrow,
.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.4;
  font-weight: 600;
}

.main-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
  padding-right: 18px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.main-nav a {
  will-change: background-color, color, box-shadow, transform;
  text-decoration: none;
  color: var(--muted);
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 1rem;
  font-weight: 700;
  transition: background-color 0.10s ease, color 0.10s ease, box-shadow 0.10s ease, transform 0.08s ease;
}

.main-nav a:hover {
  color: var(--primary-dark);
  background: var(--surface-blue);
}

.main-nav a:active {
  transform: translateY(1px);
}

.main-nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 7px 18px rgba(47, 143, 195, 0.24);
}

/* HERO */

.hero {
  padding: 94px 0 84px;
  background:
    linear-gradient(135deg, rgba(207, 232, 247, 0.96), rgba(239, 248, 255, 0.92) 48%, rgba(255,255,255,0.95)),
    radial-gradient(circle at 85% 10%, rgba(47, 143, 195, 0.22), transparent 36%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.75fr;
  gap: 70px;
  align-items: center;
}

.section-kicker {
  display: inline-block;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  line-height: 1.3;
  margin-bottom: 14px;
}

.hero h2,
.section h2 {
  margin: 0 0 20px;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.hero h2 {
  max-width: 780px;
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  font-weight: 700;
}

.lead {
  max-width: 740px;
  color: var(--muted);
  font-size: 1.13rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 11px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.10s ease, color 0.10s ease, box-shadow 0.10s ease, transform 0.08s ease;
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 8px 18px rgba(47, 143, 195, 0.18);
}

.button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(47, 143, 195, 0.25);
}

.button.secondary {
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--border);
  color: var(--primary-dark);
}

.button.secondary:hover {
  background: var(--surface-blue);
}

.info-card {
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.card-label {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 14px;
  align-items: center;
  padding: 19px 0;
  border-top: 1px solid var(--border);
}

.stat strong {
  font-size: 1.75rem;
  color: var(--primary-dark);
}

.stat span {
  color: var(--muted);
}

/* SECTIONS */

.section {
  padding: 88px 0;
  background: #f8fcff;
}

.section:nth-of-type(2) {
  background: linear-gradient(180deg, #f4fbff, #eaf6fd);
}

.section.alt {
  background: linear-gradient(180deg, var(--surface-soft), #eef8fe);
}

.section h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
}

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

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 36px;
}

.section-heading > p {
  max-width: 470px;
}

/* CARDS */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card,
.person,
.contact-box {
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card {
  padding: 28px;
  min-height: 220px;
  box-shadow: 0 10px 30px rgba(21, 91, 131, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #8ec7e5;
  box-shadow: 0 14px 34px rgba(21, 91, 131, 0.10);
}

.number {
  display: inline-block;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 28px;
}

.card h3,
.project-row h3,
.person h3 {
  margin: 0 0 8px;
}

/* PROJECTS */

.project-list {
  border-top: 1px solid var(--border);
}

.project-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.project-meta {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.9rem;
}

/* TEAM */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.person {
  padding: 24px;
  box-shadow: 0 10px 26px rgba(21, 91, 131, 0.05);
}

.avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #cfe8f7, #a9d7ee);
  color: var(--primary-dark);
  font-weight: 800;
  margin-bottom: 24px;
}

.person p {
  margin-bottom: 0;
}

/* CONTACT */

.contact-section {
  background: linear-gradient(135deg, #cfe8f7, #e8f5fc 55%, #dff0fb);
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  gap: 64px;
  align-items: start;
}

.contact-box {
  padding: 28px;
  background: rgba(255,255,255,0.82);
  box-shadow: var(--shadow);
}

.contact-box p {
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.contact-box p:last-child {
  border-bottom: none;
}

/* FOOTER */

.site-footer {
  background: linear-gradient(135deg, #114866, #173d53);
  color: rgba(255,255,255,0.9);
  padding: 26px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.9rem;
}

.footer-inner p {
  margin: 0;
}

/* RESPONSIVE */

/* Genel güvenlik */
img {
  max-width: 100%;
  height: auto;
}

body {
  overflow-x: hidden;
}

.header-inner,
.brand,
.brand-text,
.hero-grid,
.contact-grid,
.cards,
.team-grid,
.project-row,
.section-heading {
  min-width: 0;
}

/* Başlık kelimelerini ortadan bölme */
.brand h1,
.eyebrow,
.subtitle {
  overflow-wrap: normal;
  word-break: normal;
}

/* Geniş masaüstü */
@media (min-width: 1400px) {
  .header-inner {
    width: calc(100% - 48px);
    max-width: 1800px;
  }

  .brand {
    flex: 0 1 650px;
    min-width: 600px;
  }

  .main-nav {
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 4px;
    padding-right: 0;
  }
}

/* Standart masaüstü / laptop */
@media (min-width: 1181px) and (max-width: 1399px) {
  .header-inner {
    width: calc(100% - 28px);
    max-width: none;
    gap: 14px;
  }

  .brand {
    flex: 0 1 520px;
    min-width: 470px;
    gap: 7px;
  }

  .brand-logo {
    width: 180px;
    height: 104px;
  }

  .brand h1 {
    max-width: 390px;
    font-size: 1.04rem;
  }

  .eyebrow,
  .subtitle {
    font-size: 0.94rem;
  }

  .main-nav {
    flex: 1 1 auto;
    min-width: 0;
    gap: 2px;
    padding-right: 0;
  }

  .main-nav a {
    padding: 9px 7px;
    font-size: 0.86rem;
  }
}

/* Küçük laptop / tablet yatay: menü ikinci satıra geçer */
@media (max-width: 1180px) {
  :root {
    --header-offset: 210px;
  }

  .header-inner {
    width: calc(100% - 32px);
    max-width: none;
    min-height: auto;
    padding: 16px 0 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .brand {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-logo {
    width: 180px;
    height: 102px;
  }

  .brand h1 {
    max-width: none;
    font-size: 1.1rem;
  }

  .eyebrow,
  .subtitle {
    font-size: 0.98rem;
  }

  .main-nav {
    width: 100%;
    margin-left: 0;
    padding-right: 0;
    flex: 1 1 auto;
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
    gap: 5px;
  }

  .main-nav a {
    padding: 9px 10px;
    font-size: 0.92rem;
  }

  .hero {
    padding: 74px 0 66px;
  }

  .section {
    padding: 72px 0;
  }
}

/* Tablet */
@media (max-width: 900px) {
  :root {
    --header-offset: 230px;
  }

  .container {
    width: min(var(--max-width), calc(100% - 30px));
  }

  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
  }

  .section-heading > p {
    max-width: none;
  }

  .cards,
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-row {
    grid-template-columns: 170px 1fr;
    gap: 20px;
  }

  .hero h2 {
    font-size: clamp(1.9rem, 5.8vw, 2.8rem);
  }

  .section h2 {
    font-size: clamp(1.55rem, 4.8vw, 2.15rem);
  }
}

/* Telefon */
@media (max-width: 600px) {
  :root {
    --header-offset: 300px;
  }

  .header-inner {
    width: calc(100% - 22px);
    padding: 12px 0 11px;
    gap: 10px;
  }

  .brand {
    align-items: flex-start;
    gap: 9px;
  }

  .brand-logo {
    width: 128px;
    height: 76px;
    margin-top: 1px;
  }

  .brand-text {
    padding-top: 2px;
  }

  .brand h1 {
    margin-top: 3px;
    font-size: 0.92rem;
    line-height: 1.2;
  }

  .eyebrow,
  .subtitle {
    font-size: 0.82rem;
    line-height: 1.28;
  }

  .main-nav {
    gap: 4px;
  }

  .main-nav a {
    padding: 8px 8px;
    font-size: 0.81rem;
    border-radius: 9px;
  }

  .hero {
    padding: 54px 0 52px;
  }

  .hero h2 {
    font-size: clamp(1.7rem, 8.5vw, 2.25rem);
    line-height: 1.1;
  }

  .lead {
    font-size: 1rem;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .button {
    width: 100%;
    text-align: center;
  }

  .info-card {
    padding: 21px;
  }

  .section {
    padding: 56px 0;
  }

  .section-kicker {
    font-size: 0.9rem;
  }

  .section h2 {
    font-size: clamp(1.5rem, 7vw, 1.95rem);
  }

  .cards,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: auto;
    padding: 22px;
  }

  .project-row {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 23px 0;
  }

  .contact-grid {
    gap: 26px;
  }

  .contact-box {
    padding: 22px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 4px;
  }
}

/* Küçük telefon */
@media (max-width: 420px) {
  :root {
    --header-offset: 330px;
  }

  .container {
    width: calc(100% - 24px);
  }

  .brand-logo {
    width: 108px;
    height: 66px;
  }

  .brand h1 {
    font-size: 0.82rem;
    letter-spacing: 0;
  }

  .eyebrow,
  .subtitle {
    font-size: 0.75rem;
  }

  .main-nav a {
    padding: 7px 7px;
    font-size: 0.77rem;
  }

  .section-kicker {
    font-size: 0.84rem;
    letter-spacing: 0.09em;
  }
}

@media (max-width: 360px) {
  :root {
    --header-offset: 355px;
  }

  .brand-logo {
    width: 94px;
    height: 58px;
  }

  .brand h1 {
    font-size: 0.76rem;
  }

  .eyebrow,
  .subtitle {
    font-size: 0.69rem;
  }

  .main-nav a {
    font-size: 0.73rem;
    padding: 7px 6px;
  }
}
