/*
  ================================
  styles.css — Christoforos Kagias
  ================================

  WHAT THIS FILE DOES:
  This file styles the HTML page. It sets colors, spacing, and layout.
  
  Note for beginners: We are using direct values (like #ffffff for white) 
  instead of variables to make it easier to read exactly what is happening 
  on each line. Dark mode overrides are grouped at the very bottom.
*/

/* ================================
   1. RESET
   ================================
   Browsers add their own default margins and paddings. 
   This resets everything so we start from a clean slate. 
*/

*,
*::before,
*::after {
    box-sizing: border-box;
    /* Ensures padding doesn't increase element width */
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* Smooth scrolling when clicking nav links */
    /* Stops the page from scrolling behind the sticky navigation bar */
    scroll-padding-top: 92px;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #0a0a0a;
    /* Dark text */
    background-color: #ffffff;
    /* White background */

    /* Makes fonts look slightly sharper on Mac/iOS */
    -webkit-font-smoothing: antialiased;

    /* Smooth fade when toggling dark mode */
    transition: background-color 150ms ease, color 150ms ease;
}

/* Prevent images from breaking out of their containers */
img,
picture,
video,
svg {
    display: block;
    max-width: 100%;
}

/* Remove default link underlines and blue color */
a {
    color: inherit;
    text-decoration: none;
}

/* Remove default bullet points from lists */
ul,
ol {
    list-style: none;
}

/* Reset button styling */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ================================
   2. TYPOGRAPHY
   ================================ */

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    letter-spacing: -0.03em;
    font-weight: 600;
    color: #0a0a0a;
}

/* ================================
   3. LAYOUT
   ================================ */

/* Centers content and prevents it from getting too wide */
.container {
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* Spacing and border for major sections */
.section {
    padding-top: clamp(16px, 5vw, 20px);
    /* Reduced to bring "EXPERIENCE" closer to the top line */
    padding-bottom: 16px;
    /* Reduced to bring text closer to the bottom line */
    border-top: 1px solid #e5e5e5;
}

/* The small "EXPERIENCE" and "PROJECTS" labels */
.section_title {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b6b6b;
    margin-bottom: 16px;
}

/* ================================
   4. NAVIGATION
   ================================ */

/* The sticky top bar */
.site_header {
    position: sticky;
    top: 0;
    z-index: 100;
    /* Keeps the nav on top of other content */
    height: 60px;
    background-color: rgba(255, 255, 255, 0.85);
    /* Semi-transparent white */
    border-bottom: 1px solid #e5e5e5;
    backdrop-filter: blur(12px);
    /* Frosted glass effect */
    -webkit-backdrop-filter: blur(12px);
    transition: background-color 150ms ease;
}

.nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* 3 columns to perfectly center links */
    align-items: center;
    height: 100%;
}

.nav_links {
    display: flex;
    align-items: center;
    gap: 24px;
    grid-column: 1;
    /* Places links in the first grid column */
}

.nav_links a {
    font-size: 14px;
    color: #6b6b6b;
    transition: color 150ms ease;
}

.nav_links a:hover {
    color: #0a0a0a;
}

/* ================================
   5. HERO SECTION
   ================================ */

.hero {
    display: grid;
    grid-template-columns: auto 1fr;
    /* Photo on left, text on right */
    gap: 48px;
    align-items: center;
    padding-top: clamp(16px, 5vw, 20px);
    padding-bottom: clamp(16px, 5vw, 20px);
}

.hero_link {
    display: flex;
    gap: 16px;
    align-items: center;
}

.hero_tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: #6b6b6b;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    /* Pill shape */
    padding: 4px 12px;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 56px);
    /* Scales with screen size */
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: 16px;
}


.hero_sub {
    font-size: 16px;
    color: #6b6b6b;
    max-width: 48ch;
    /* Restricts line length for readability */
    margin-bottom: 8px;
}

.hero_cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 150ms ease;
}

.btn_primary {
    background-color: #0a0a0a;
    color: #ffffff;
    border-color: #0a0a0a;
}

.btn_primary:hover {
    background-color: #333333;
    border-color: #333333;
}

.btn_ghost {
    background-color: transparent;
    color: #0a0a0a;
    border-color: #e5e5e5;
}

.btn_ghost:hover {
    background-color: #f9f9f9;
}

/* ================================
   6. EXPERIENCE TABS
   ================================ */

.exp_tabs_bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 32px;
}

.exp_tab {
    font-size: 14px;
    font-weight: 500;
    color: #6b6b6b;
    border-radius: 6px;
    padding: 8px 16px;
    transition: all 150ms ease;
}

.exp_tab:hover {
    color: #0a0a0a;
}

.exp_tab.exp_tab_active {
    background-color: #ffffff;
    color: #0a0a0a;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.exp_panel {
    display: flex;
    flex-direction: column;
}

/* Important: forces hidden panels to disappear */
.exp_panel[hidden] {
    display: none !important;
}

/* Fade-in animation when switching tabs */
@keyframes exp_panel_in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.exp_panel.is-entering {
    animation: exp_panel_in 220ms ease forwards;
}

.exp_entry {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 16px;
}

.exp_entry_aside {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.exp_entry_logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e5e5e5;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a0a;
    flex-shrink: 0;
    overflow: hidden;
}

.exp_entry_logo_text {
    font-size: 12px;
    font-weight: 700;
}

/* Vertical timeline line */
.exp_entry_line {
    flex: 1;
    width: 1px;
    background-color: #e5e5e5;
    min-height: 24px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.exp_entry_last .exp_entry_line {
    display: none;
}

.exp_entry_body {
    padding-bottom: 32px;
}

.exp_entry_last .exp_entry_body {
    padding-bottom: 16px;
}

.exp_entry_company {
    font-size: 16px;
    font-weight: 600;
    color: #0a0a0a;
    margin-bottom: 12px;
    padding-top: 6px;
}

.exp_role {
    margin-bottom: 10px;
}

.exp_role_header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.exp_role_title {
    font-size: 14px;
    font-weight: 600;
    color: #0a0a0a;
}

.exp_role_period {
    font-size: 12px;
    color: #6b6b6b;
    white-space: nowrap;
}

.exp_role_bullets {
    list-style: disc;
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.exp_role_bullets li {
    font-size: 14px;
    color: #6b6b6b;
}

/* ================================
   7. PROJECT GRID
   ================================ */

.project_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Responsive grid */
    gap: 16px;
}

.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: all 150ms ease;
}

.card:hover {
    border-color: #6b6b6b;
}

.card a {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    width: 100%;
}

.card_title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card_link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #0a0a0a;
    transition: color 150ms ease;
}

/* Arrow icon inside project title */
.card_arrow {
    opacity: 0;
    transform: translate(-2px, 2px);
    transition: all 150ms ease;
}

.card_link:hover {
    color: #6b6b6b;
}

.card_link:hover .card_arrow {
    opacity: 1;
    transform: translate(0, 0);
}

.card_desc {
    font-size: 14px;
    color: #6b6b6b;
    margin-bottom: 12px;
}

/* ================================
   8. TAGS
   ================================ */

.tag_list {
    margin-top: auto;
    padding-left: 0;
    list-style: none;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 12px;
    font-weight: 500;
    color: #3f3f3f;
    background-color: #f3f3f3;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 2px 8px;
}

/* ================================
   9. CONTACT & FOOTER
   ================================ */

.contact_block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.contact_block_lead {
    font-size: 18px;
    color: #6b6b6b;
    max-width: 52ch;
}

.contact_block_links {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #6b6b6b;
}

.contact_social_link {
    color: #6b6b6b;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: all 150ms ease;
}

.contact_social_link:hover {
    color: #0a0a0a;
    text-decoration-color: #0a0a0a;
}

.site_footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    padding-bottom: 32px;
    border-top: 1px solid #e5e5e5;
    font-size: 12px;
    color: #6b6b6b;
}

/* ================================
   10. THEME TOGGLE BUTTON
   ================================ */

.theme_toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    grid-column: 3;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    color: #6b6b6b;
    transition: all 150ms ease;
}

.theme_toggle:hover {
    background-color: #f9f9f9;
    color: #0a0a0a;
}

.theme_toggle .icon {
    position: absolute;
    /* Stacks sun and moon on top of each other */
    transition: all 200ms ease;
}

/* Default (Light Mode): Show moon, hide sun */
.icon_sun {
    opacity: 0;
    transform: scale(0.7) rotate(90deg);
}

.icon_moon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* ================================
   11. MOBILE SCREENS
   ================================ */

@media (max-width: 640px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 16px;
    }

    .hero_image_wrap {
        display: flex;
        justify-content: center;
    }

    .hero_sub {
        max-width: 100%;
    }

    .hero_cta {
        justify-content: center;
    }

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

    .exp_role_period {
        order: -1;
    }

    .project_grid {
        grid-template-columns: 1fr;
    }

    .nav_links {
        gap: 16px;
    }

    .site_footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .hero_link {
        width: 100%;
        justify-content: center;
    }
}

/* ================================
   12. DARK MODE OVERRIDES
   ================================ 
   When JavaScript adds data-theme="dark" to the <html> tag, 
   all these rules take over to repaint the site in dark colors.
*/

[data-theme="dark"] body {
    background-color: #0a0a0a;
    color: #ededed;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
    color: #ededed;
}

[data-theme="dark"] .section {
    border-top-color: #2a2a2a;
}

[data-theme="dark"] .section_title {
    color: #888888;
}

[data-theme="dark"] .site_header {
    background-color: rgba(10, 10, 10, 0.85);
    /* Semi-transparent dark */
    border-bottom-color: #2a2a2a;
}

[data-theme="dark"] .nav_links a {
    color: #888888;
}

[data-theme="dark"] .nav_links a:hover {
    color: #ededed;
}

[data-theme="dark"] .hero_avatar {
    border-color: #2a2a2a;
    background-image: linear-gradient(135deg, #2a2a2a 0%, #111111 100%);
}

[data-theme="dark"] .hero_avatar::after {
    background-color: #2a2a2a;
}

[data-theme="dark"] .hero_tag {
    color: #888888;
    border-color: #2a2a2a;
}

[data-theme="dark"] .hero_sub {
    color: #888888;
}

[data-theme="dark"] .btn_primary {
    background-color: #ededed;
    color: #0a0a0a;
    border-color: #ededed;
}

[data-theme="dark"] .btn_primary:hover {
    background-color: #c0c0c0;
    border-color: #c0c0c0;
}

[data-theme="dark"] .btn_ghost {
    color: #ededed;
    border-color: #2a2a2a;
}

[data-theme="dark"] .btn_ghost:hover {
    background-color: #111111;
}

[data-theme="dark"] .exp_tabs_bar {
    background-color: #111111;
    border-color: #2a2a2a;
}

[data-theme="dark"] .exp_tab {
    color: #888888;
}

[data-theme="dark"] .exp_tab:hover {
    color: #ededed;
}

[data-theme="dark"] .exp_tab.exp_tab_active {
    background-color: #1e1e1e;
    color: #ededed;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .exp_entry_logo {
    border-color: #2a2a2a;
    background-color: #111111;
    color: #ededed;
}

[data-theme="dark"] .exp_entry_line {
    background-color: #2a2a2a;
}

[data-theme="dark"] .exp_entry_company {
    color: #ededed;
}

[data-theme="dark"] .exp_role_title {
    color: #ededed;
}

[data-theme="dark"] .exp_role_period {
    color: #888888;
}

[data-theme="dark"] .exp_role_bullets li {
    color: #888888;
}

[data-theme="dark"] .card {
    background-color: #111111;
    border-color: #2a2a2a;
}

[data-theme="dark"] .card:hover {
    border-color: #888888;
}

[data-theme="dark"] .card_link {
    color: #ededed;
}

[data-theme="dark"] .card_link:hover {
    color: #888888;
}

[data-theme="dark"] .card_desc {
    color: #888888;
}

[data-theme="dark"] .tag {
    color: #b0b0b0;
    background-color: #1c1c1c;
    border-color: #2a2a2a;
}

[data-theme="dark"] .contact_block_lead {
    color: #888888;
}

[data-theme="dark"] .contact_block_links {
    color: #888888;
}

[data-theme="dark"] .contact_social_link {
    color: #888888;
}

[data-theme="dark"] .contact_social_link:hover {
    color: #ededed;
    text-decoration-color: #ededed;
}

[data-theme="dark"] .site_footer {
    border-top-color: #2a2a2a;
    color: #888888;
}

[data-theme="dark"] .theme_toggle {
    border-color: #2a2a2a;
    color: #888888;
}

[data-theme="dark"] .theme_toggle:hover {
    background-color: #111111;
    color: #ededed;
}

/* In dark mode: Show sun, hide moon */
[data-theme="dark"] .icon_sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

[data-theme="dark"] .icon_moon {
    opacity: 0;
    transform: scale(0.7) rotate(-90deg);
}