html {
    line-height: 1.15;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}
body {
    margin: 0;
}
article,
aside,
footer,
header,
nav,
section {
    display: block;
}
h1 {
    font-size: 2em;
    margin: 0.67em 0;
}
figcaption,
figure,
main {
    display: block;
}
figure {
    margin: 1em 40px;
}
hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
}
pre {
    font-family: monospace, monospace;
    font-size: 1em;
}
a {
    background-color: transparent;
    -webkit-text-decoration-skip: objects;
}
abbr[title] {
    border-bottom: none;
    text-decoration: underline;
    text-decoration: underline dotted;
}
b,
strong {
    font-weight: inherit;
}
b,
strong {
    font-weight: bolder;
}
code,
kbd,
samp {
    font-family: monospace, monospace;
    font-size: 1em;
}
dfn {
    font-style: italic;
}
mark {
    background-color: #ff0;
    color: #000;
}
small {
    font-size: 80%;
}
sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}
sub {
    bottom: -0.25em;
}
sup {
    top: -0.5em;
}
audio,
video {
    display: inline-block;
}
audio:not([controls]) {
    display: none;
    height: 0;
}
img {
    border-style: none;
}
svg:not(:root) {
    overflow: hidden;
}
button,
input,
optgroup,
select,
textarea {
    font-family: sans-serif;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}
button,
input {
    overflow: visible;
}
button,
select {
    text-transform: none;
}
button,
html [type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}
fieldset {
    padding: 0.35em 0.75em 0.625em;
}
legend {
    box-sizing: border-box;
    color: inherit;
    display: table;
    max-width: 100%;
    padding: 0;
    white-space: normal;
}
progress {
    display: inline-block;
    vertical-align: baseline;
}
textarea {
    overflow: auto;
}
[type="checkbox"],
[type="radio"] {
    box-sizing: border-box;
    padding: 0;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
    height: auto;
}
[type="search"] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}
::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}
details,
menu {
    display: block;
}
summary {
    display: list-item;
}
canvas {
    display: inline-block;
}
template {
    display: none;
}
[hidden] {
    display: none;
}

.clearfix:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: "";
    clear: both;
    height: 0;
}

html {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

html,
body {
    width: 100%;
    height: 100%;
    position: relative;
    font-size: 1.1rem;
}

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    position: relative;
    margin: 0;
    opacity: 0;
    color: var(--text);
    background: var(--bg);
    transition:
        background 0.4s ease,
        color 0.4s ease;
    animation: 0.7s ease-in 0.3s fadeIn forwards;
    font-size: 1.15rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    padding: 0;
    font-family: "Instrument Serif", serif;
    font-weight: 400;
}

h3,
.nav a,
.resume-link a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav a:hover,
.resume-link a:hover {
    color: var(--accent);
}

.wrapper {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

.code2-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.nav {
    height: 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav ul {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style-type: none;
    width: 100%;
}

.landing {
    width: 100%;
    height: 95%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.contact-btns ul {
    /* border: 2px solid var(--text-muted); */
    margin: 0;
    padding: 0;
    list-style-type: none;
    display: flex;
    justify-content: center;
    align-items: center;
}
.contact-btns li {
    margin: 10px 20px;
}

.header {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.img-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5%;
}

.img-container img {
    width: 40%;
    min-width: 200px;
    height: auto;
}

/* about me */
.about-me,
.contact,
.skills,
.projects {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch; /* allow children to take full width so headings align */
    margin: 0 auto;
    margin-top: 1.5em;
}

.about-me p {
    max-width: 600px;
    margin: 0 auto;
    /* text-align: center; */
}

.resume-link-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10%;
}

.resume-link {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid var(--text-muted);
    border-radius: 5px;

    /* Text styling overrides for anchors */
    color: inherit;
    text-decoration: none;
    font-weight: 500;

    transition: all 0.3s ease-in-out;
}

.resume-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

/* Skills */
.skills {
    margin-top: 5%;
}

.skills-container {
    width: 100%;
}

.skills-container ul {
    max-width: 600px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style-type: circle;
    margin: 0;
    padding: 0;
    margin: 0 auto;
    gap: 30px; /* Modern layout option to separate the icons cleanly */
}

/* projects */
/* .projects {
    max-width: 600px;
} */
.project3 {
    border: 1px solid red;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.project3 .img-container a {
    display: block;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.projects-container h2 {
    width: 100%;
    margin: 0 auto;
}

/* contact container layout */
.contact {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 0; /* Gives your footer breathing room */
}

.contact h2 {
    margin-bottom: 20px;
}

/* Reset the default browser list styling */
.contact-btns ul {
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0;
    gap: 30px; /* Modern layout option to separate the icons cleanly */
}

/* Base style for the anchor links holding your icons */
.contact-btns a {
    color: var(
        --text-muted
    ); /* Automatically conforms to your active theme color */
    font-size: 2rem; /* Magnifies the icons cleanly without pixelation */
    display: inline-block;
    transition: all 0.3s ease-in-out;
}

/* High-end hover states */
.contact-btns a:hover {
    color: var(--accent); /* Lights up your theme accent color on hover */
    transform: translateY(-3px); /* Subtle modern lift interaction */
}

/* Themes */

.theme-btn {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;

    /* Variables drive the button look completely */
    color: var(--accent);
    border: none;
    background: none;

    position: fixed;
    bottom: 15px; /* Moved to top to match your header nav space */
    right: 15px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    color: var(--btn-hover);
    transform: translateY(-1px);
}

.light-mode {
    --bg: #fdfbf7;
    --text: #1c1b19;
    --text-muted: #6f6c66;
    --accent: #c28e6b;
    --btn-hover: #1c1b19;
}

.dark-mode {
    --bg: #121212;
    --text: #f4f0ea;
    --text-muted: #9e9a93;
    --accent: #e0a982;
    --btn-hover: #f4f0ea;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Media queries */
@media (max-width: 800px) {
    .about-me h2,
    .skills h2 {
        transform: translateX(0%);
    }
}

/* Projects video grid */
.video-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* two per row by default */
    gap: 30px;
    margin-top: 20px;
}

.project-card {
    background: rgba(255, 255, 255, 0.02);
    padding: 18px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-card h3 {
    font-size: 1.15rem;
    color: var(--text-muted);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.project-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    flex: 1 1 auto; /* allow description to grow so link sits at bottom */
}

.project-card a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin-top: auto; /* push link to bottom of card */
}

@media (max-width: 640px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    .wrapper {
        width: 94%;
    }

    /* Mobile tweaks for code page and general small screens */
    .wrapper {
        padding-left: 8px;
        padding-right: 8px;
    }

    /* keep nav layout unchanged on mobile to avoid breaking header layout */

    .header h1 {
        font-size: 1.4rem;
        text-align: center;
    }

    .header h3 {
        font-size: 0.95rem;
        text-align: center;
    }

    .img-container img {
        width: 70%;
        min-width: 140px;
        margin-top: 10px;
    }

    .skills-container ul {
        gap: 14px;
        justify-content: center;
        padding-left: 0;
    }

    .project-card {
        padding: 14px;
    }

    .project-card h3 {
        font-size: 1rem;
    }

    .projects h2 {
        margin-bottom: 28px;
    }

    .about-me p,
    .project-card p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .theme-btn {
        bottom: 12px;
        right: 12px;
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 420px) {
    .header h1 {
        font-size: 1.2rem;
    }
    .header h3 {
        font-size: 0.9rem;
    }
    .nav a {
        font-size: 0.9rem;
    }
    .project-card h3 {
        font-size: 0.95rem;
    }
    .project-card a {
        font-size: 0.95rem;
    }
}

@media (min-width: 3000px) {
    .video-grid {
        grid-template-columns: repeat(
            4,
            1fr
        ); /* single row for up to 4 items on very wide screens */
    }
}

/* Ensure project images stretch to match video aspect and width */
.project-card .img-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    margin-top: 0; /* override global .img-container spacing so cards align */
}

.project-card .img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* More space below the Featured Projects heading */
.projects h2,
.skills h2,
.about-me h2 {
    margin-bottom: 40px;
}
