:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #5b677a;
  --line: #d8e0ea;
  --accent: #0b6b68;
  --accent-strong: #084f4d;
  --coral: #b45309;
  --gold: #a16207;
  --navy: #172554;
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.11);
  --radius: 8px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(11, 107, 104, 0.14), transparent 34rem),
    linear-gradient(180deg, #eef5f5 0%, var(--bg) 42%, #ffffff 100%);
  font-size: 16px;
  line-height: 1.68;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(219, 227, 238, 0.85);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--accent));
  font-size: 0.86rem;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a {
  color: #263247;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent-strong);
}

.nav-toggle,
.nav-button {
  display: none;
}

.section-pad {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(2.9rem, 7.2vw, 6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  line-height: 1.25;
}

.compact-page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.hero-subtitle {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 20px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--navy);
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.secondary {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.button.full {
  width: 100%;
  margin-top: 24px;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 660px;
  margin: 44px 0 0;
}

.quick-stats div {
  border-left: 4px solid var(--gold);
  padding-left: 16px;
}

.quick-stats dt {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.quick-stats dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-media {
  position: relative;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.toastmasters-menu {
  min-height: calc(100vh - 72px);
  display: grid;
  align-content: center;
}

.toastmasters-button-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.toastmasters-box {
  display: grid;
  min-height: 190px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 44px rgba(23, 32, 51, 0.08);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.toastmasters-box:hover,
.toastmasters-box:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-4px);
}

.toastmasters-box span {
  color: var(--coral);
  font-size: 0.9rem;
  font-weight: 800;
}

.toastmasters-box strong {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.15;
}

.simple-page {
  min-height: calc(100vh - 72px);
  display: grid;
  align-content: center;
}

.table-topic-page,
.completed-page,
.vocabulary-page {
  min-height: calc(100vh - 72px);
}

.table-topic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.48fr);
  gap: 24px;
  align-items: start;
}

.question-card,
.timer-box,
.completed-item,
.vocabulary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 44px rgba(23, 32, 51, 0.08);
}

.question-card {
  padding: clamp(22px, 4vw, 36px);
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hidden-hint,
.empty-state p,
.timer-note,
.completed-item p {
  color: var(--muted);
}

.question-text {
  min-height: 150px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
}

.completed-question-text {
  min-height: auto;
}

.question-actions,
.topic-nav,
.topic-complete,
.timer-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.question-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.topic-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.topic-nav .button {
  width: 100%;
}

.topic-complete .button {
  width: 100%;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.timer-box {
  padding: 28px;
  text-align: center;
  transition: background-color 180ms ease, color 180ms ease;
}

#timerDisplay {
  color: var(--ink);
  font-size: clamp(3.4rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1;
}

.timer-box.timer-green {
  background: #15803d;
}

.timer-box.timer-yellow {
  background: #ca8a04;
}

.timer-box.timer-red {
  background: #dc2626;
}

.timer-box.timer-green,
.timer-box.timer-yellow,
.timer-box.timer-red,
.timer-box.timer-green .eyebrow,
.timer-box.timer-yellow .eyebrow,
.timer-box.timer-red .eyebrow,
.timer-box.timer-green .timer-note,
.timer-box.timer-yellow .timer-note,
.timer-box.timer-red .timer-note,
.timer-box.timer-green #timerDisplay,
.timer-box.timer-yellow #timerDisplay,
.timer-box.timer-red #timerDisplay {
  color: #fff;
}

.completed-list {
  display: grid;
  gap: 14px;
}

.completed-item {
  padding: 22px;
}

.completed-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.completed-item p {
  margin: 0;
  font-size: 1.08rem;
}

.vocabulary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 24px;
  align-items: start;
}

.vocabulary-card {
  padding: clamp(22px, 4vw, 36px);
}

.word-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.word-pair.single {
  grid-template-columns: 1fr;
}

.word-pair > div,
.definition-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #fbfdff;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.word-pair strong {
  display: block;
  color: var(--navy);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

.word-pair .antonym-text {
  color: var(--coral);
}

.icon-speak {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.icon-speak:hover,
.icon-speak:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
  outline: none;
}

.definition-block {
  margin-top: 16px;
}

.definition-block p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1.08rem;
}

.inline-form {
  display: grid;
  gap: 14px;
}

.inline-form label {
  display: grid;
  gap: 8px;
  color: #29364d;
  font-weight: 800;
}

.inline-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
  background: #fbfdff;
}

.inline-form input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(11, 107, 104, 0.18);
}

.section-heading {
  margin-bottom: 32px;
}

.about-grid,
.resume-layout,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.75fr);
  gap: 32px;
}

.about-grid p,
.timeline-item,
.skills-panel,
.blog-card,
.qualification-grid article,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 36px rgba(23, 32, 51, 0.06);
}

.about-grid p {
  margin: 0;
  padding: 26px;
  color: var(--muted);
}

.project-grid,
.blog-grid,
.qualification-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 44px rgba(23, 32, 51, 0.08);
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.project-card div {
  padding: 22px;
}

.tag,
.date {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card p:last-child,
.blog-card p,
.qualification-grid p {
  color: var(--muted);
}

.achievements {
  border-top: 1px solid rgba(216, 224, 234, 0.7);
  border-bottom: 1px solid rgba(216, 224, 234, 0.7);
}

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

.achievement-grid article {
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 36px rgba(17, 24, 39, 0.06);
}

.achievement-grid strong {
  display: block;
  margin-bottom: 12px;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.achievement-grid span {
  display: block;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  padding: 24px;
}

.timeline-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-weight: 800;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
}

.skills-panel {
  align-self: start;
  padding: 26px;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: #f9fbfd;
  color: #273244;
  font-size: 0.92rem;
  font-weight: 700;
}

.blog-card,
.qualification-grid article {
  padding: 24px;
}

.blog-card a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.07);
}

.contact {
  align-items: start;
}

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

.contact-copy a {
  color: var(--accent-strong);
  font-weight: 800;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 26px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: #29364d;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
  background: #fbfdff;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(15, 118, 110, 0.18);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
}

.footer div {
  display: flex;
  gap: 18px;
}

.footer a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 920px) {
  .nav-button {
    display: grid;
    gap: 5px;
    width: 44px;
    height: 44px;
    place-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .nav-button span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
  }

  .nav-links {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .nav-links a {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a:last-child {
    border-bottom: 0;
  }

  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  .hero,
  .about-grid,
  .resume-layout,
  .contact,
  .table-topic-layout,
  .vocabulary-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 56px;
  }

  .hero-media {
    max-width: 520px;
  }

  .project-grid,
  .blog-grid,
  .achievement-grid,
  .qualification-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .section-pad {
    width: min(100% - 24px, 1180px);
    padding: 58px 0;
  }

  .nav-shell {
    width: min(100% - 24px, 1180px);
  }

  .quick-stats,
  .project-grid,
  .blog-grid,
  .achievement-grid,
  .qualification-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .brand span:last-child {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .toastmasters-button-grid {
    grid-template-columns: 1fr;
  }

  .word-pair {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .question-actions,
  .topic-nav,
  .topic-complete,
  .timer-actions,
  .page-actions {
    flex-direction: column;
  }

  .question-actions,
  .topic-nav {
    grid-template-columns: 1fr;
  }

  .footer {
    width: min(100% - 24px, 1180px);
    align-items: flex-start;
    flex-direction: column;
  }
}
