/*
 * GDG Cloud Konya — one stylesheet, no build step.
 * Light and dark themes from the same tokens; Google's four colours as accents.
 */

@font-face {
  font-family: "Google Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/google-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Google Sans";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/google-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "Google Sans";
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/google-sans-700.woff2") format("woff2");
}

/* ---------- Tokens ---------- */

:root {
  --blue: #4285f4;
  --red: #ea4335;
  --yellow: #fbbc04;
  --green: #34a853;

  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --surface: #ffffff;
  --text: #1f1f1f;
  --muted: #5f6368;
  --line: #e3e7ee;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, 0.06), 0 16px 40px rgba(16, 24, 40, 0.1);

  --radius: 20px;
  --font: "Google Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1f1f1f;
    --bg-alt: #28292a;
    --surface: #2d2e30;
    --text: #e8eaed;
    --muted: #9aa0a6;
    --line: #3c4043;
    --nav-bg: rgba(31, 31, 31, 0.72);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45);
  }
}
:root[data-theme="dark"] {
  --bg: #1f1f1f;
  --bg-alt: #28292a;
  --surface: #2d2e30;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --line: #3c4043;
  --nav-bg: rgba(31, 31, 31, 0.72);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45);
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s, color 0.25s;
}

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

a {
  color: inherit;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 700;
}

h3 {
  font-size: 21px;
  font-weight: 500;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.lead {
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 620px;
  margin: 16px 0 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--blue);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
}
.skip-link:focus {
  left: 8px;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s, background-color 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 18px rgba(66, 133, 244, 0.35);
}
.btn-primary:hover {
  background: #3367d6;
}
.btn-ghost {
  border-color: var(--line);
  background: var(--surface);
}
.btn-ghost:hover {
  border-color: var(--blue);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.text-link {
  color: var(--blue);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}
.text-link:hover {
  text-decoration: underline;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.icon-btn:hover {
  border-color: var(--blue);
}

/* ---------- Navigation ---------- */

.nav-wrap {
  position: fixed;
  inset: 12px 0 auto 0;
  z-index: 50;
  padding: 0 16px;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  position: relative;
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 10px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
}
.brand img {
  height: 20px;
  width: auto;
}
.brand b {
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.i-moon {
  display: none;
}
:root[data-theme="dark"] .i-sun {
  display: none;
}
:root[data-theme="dark"] .i-moon {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun {
    display: none;
  }
  :root:not([data-theme="light"]) .i-moon {
    display: block;
  }
}

.menu-btn {
  display: none;
}

@media (max-width: 860px) {
  .menu-btn {
    display: inline-grid;
  }
  .nav-actions .btn {
    display: none;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-hover);
    opacity: 0;
    transform: translateY(-6px);
    visibility: hidden;
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  }
  .nav-links.open {
    opacity: 1;
    transform: none;
    visibility: visible;
  }
  .nav-links a {
    padding: 12px 14px;
    font-size: 16px;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 150px 0 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(40px, 6.2vw, 72px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* The logo as dots (particles.js). The <img> is the fallback until the canvas takes over. */
.logo-particles {
  position: relative;
  aspect-ratio: 1130 / 720;
  touch-action: pan-y;
}
.logo-particles img,
.logo-particles canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.logo-particles img {
  object-fit: contain;
  padding: 8%;
}
.logo-particles canvas {
  display: none;
}
.logo-particles.live img {
  display: none;
}
.logo-particles.live canvas {
  display: block;
  cursor: crosshair;
}

@media (max-width: 900px) {
  .hero {
    padding-top: 120px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .logo-particles {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 104px 0;
}
.section-alt {
  background: var(--bg-alt);
}

.section-head {
  margin-bottom: 48px;
}
.section-head.row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head h2 {
  max-width: 720px;
}

/* Cards */

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s;
}
a.card:hover {
  border-color: var(--blue);
}
.card p {
  margin: 0;
  color: var(--muted);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  margin-bottom: 8px;
}
.card-icon svg {
  width: 24px;
  height: 24px;
}
.c-blue .card-icon {
  background: rgba(66, 133, 244, 0.12);
  color: var(--blue);
}
.c-red .card-icon {
  background: rgba(234, 67, 53, 0.12);
  color: var(--red);
}
.c-yellow .card-icon {
  background: rgba(251, 188, 4, 0.16);
  color: #e2a600;
}
.c-green .card-icon {
  background: rgba(52, 168, 83, 0.12);
  color: var(--green);
}

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.span-2 {
  grid-column: span 2;
}
.card-devfest {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(52, 168, 83, 0.12), transparent 60%),
    var(--surface);
}
.card-devfest .text-link {
  margin-top: auto;
  padding-top: 8px;
}

@media (max-width: 860px) {
  .bento {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
}

/* Events */

.tabs {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.tabs button {
  border: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 14px var(--font);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.tabs button[aria-selected="true"] {
  background: var(--blue);
  color: #fff;
}

.events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.event {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.event[hidden] {
  display: none;
}
.event time {
  font-size: 14px;
  color: var(--muted);
}
.event h3 {
  font-size: 22px;
}
.event p {
  margin: 0;
  color: var(--muted);
}
.event > .text-link {
  margin-top: auto;
  padding-top: 8px;
}

.badge {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.event[data-kind="conference"] .badge {
  background: rgba(234, 67, 53, 0.12);
  color: var(--red);
}
.event[data-kind="workshop"] .badge {
  background: rgba(66, 133, 244, 0.12);
  color: var(--blue);
}
.event[data-kind="meetup"] .badge {
  background: rgba(52, 168, 83, 0.12);
  color: var(--green);
}

.event.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) 1.1fr;
  padding: 0;
  overflow: hidden;
}
.event.featured[hidden] {
  display: none;
}
.event-media {
  min-height: 240px;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.1), transparent),
    url("/assets/img/city-red.webp") center bottom / cover,
    #f7e9d0;
}
.event-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.event.featured h3 {
  font-size: 32px;
}
.event-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
}

@media (max-width: 760px) {
  .event.featured {
    grid-template-columns: 1fr;
  }
  .event-media {
    min-height: 160px;
  }
  .event-body {
    padding: 24px;
  }
}

.note {
  margin-top: 32px;
  color: var(--muted);
}
.note a {
  color: var(--blue);
}

/* Get involved */

.involve {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.involve-card {
  text-decoration: none;
  overflow: hidden;
}
.involve-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
}
.involve-card.c-blue::before {
  background: var(--blue);
}
.involve-card.c-green::before {
  background: var(--green);
}
.involve-card.c-yellow::before {
  background: var(--yellow);
}
.involve-card h3 {
  font-size: 24px;
}
.involve-card .text-link {
  margin-top: auto;
  padding-top: 12px;
}
@media (max-width: 860px) {
  .involve {
    grid-template-columns: 1fr;
  }
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.contact .btn {
  margin-top: 28px;
}
.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.socials a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.15s;
}
.socials a:hover {
  border-color: var(--blue);
}
.socials span {
  color: var(--muted);
}
.socials b {
  font-weight: 500;
}
@media (max-width: 860px) {
  .contact {
    grid-template-columns: 1fr;
  }
}

/* Footer */

.footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.disclaimer {
  margin: 0;
  max-width: 640px;
  font-size: 13px;
  color: var(--muted);
}

/* Scroll reveal (the .js class is only added by script.js, so without JS everything shows). */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 560px) {
  .section {
    padding: 72px 0;
  }
  .brand span {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card,
  .btn,
  .socials a {
    transition: none;
  }
}
