We have obtained spatially resolved spectra of Titan in the near-infrared J, H and K bands at a resolving power of ~5000 using the near-infrared integral field spectrometer (NIFS) on the Gemini North 8m telescope. Using recent data from the Cassini/Huygens mission on the atmospheric composition and surface and aerosol properties, we develop a multiple-scattering radiative transfer model for the Titan atmosphere. The Titan spectrum at these wavelengths is dominated by absorption due to methane with a series of strong absorption band systems separated by window regions where the surface of Titan can be seen. We use a line-by-line approach to derive the methane absorption coefficients. The methane spectrum is only accurately represented in standard line lists down to ~2.1μm. However, by making use of recent laboratory data and modeling of the methane spectrum we are able to construct a new line list that can be used down to 1.3μm. The new line list allows us to generate spectra that are a good match to the observations at all wavelengths longer than 1.3μm and allow us to model regions, such as the 1.55μm window that could not be studied usefully with previous line lists such as HITRAN 2008. We point out the importance of the far-wing line shape of strong methane lines in determining the shape of the methane windows. Line shapes with Lorentzian, and sub-Lorentzian regions are needed to match the shape of the windows, but different shape parameters are needed for the 1.55μm and 2μm windows. After the methane lines are modeled our observations are sensitive to additional absorptions, and we use the data in the 1.55μm region to determine a D/H ratio of 1.77±0.20×10-4, and a CO mixing ratio of 50±11ppmv. In the 2μm window we detect absorption features that can be identified with the ν5+3ν6 and 2ν3+2ν6 bands of CH3D.